KURL -> KUrl

svn path=/trunk/KDE/kdebase/konqueror/; revision=501890
This commit is contained in:
Laurent Montel 2006-01-24 08:32:09 +00:00
parent 581808c1a4
commit 6df072e199
129 changed files with 712 additions and 712 deletions

View file

@ -141,7 +141,7 @@ void ChFaceDlg::addCustomPixmap( QString imPath, bool saveCopy )
userfaces.mkdir( userfaces.absolutePath() );
pix.save( userfaces.absolutePath() + "/.userinfo-tmp" , "PNG" );
KonqOperations::copy( this, KonqOperations::COPY, KURL::List( KURL( userfaces.absolutePath() + "/.userinfo-tmp" ) ), KURL( userfaces.absPath() + "/" + QFileInfo(imPath).fileName().section(".",0,0) ) );
KonqOperations::copy( this, KonqOperations::COPY, KUrl::List( KURL( userfaces.absolutePath() + "/.userinfo-tmp" ) ), KURL( userfaces.absPath() + "/" + QFileInfo(imPath).fileName().section(".",0,0) ) );
#if 0
if ( !pix.save( userfaces.absolutePath() + "/" + imPath , "PNG" ) )
KMessageBox::sorry(this, i18n("There was an error saving the image:\n%1").arg( userfaces.absolutePath() ) );

View file

@ -305,7 +305,7 @@ bool KCMUserAccount::eventFilter(QObject *, QEvent *e)
return true;
}
KURL *url = decodeImgDrop( (QDropEvent *) e, this);
KUrl *url = decodeImgDrop( (QDropEvent *) e, this);
if (url)
{
QString pixPath;
@ -319,13 +319,13 @@ bool KCMUserAccount::eventFilter(QObject *, QEvent *e)
return false;
}
inline KURL *KCMUserAccount::decodeImgDrop(QDropEvent *e, QWidget *wdg)
inline KUrl *KCMUserAccount::decodeImgDrop(QDropEvent *e, QWidget *wdg)
{
KURL::List uris;
KUrl::List uris;
if (K3URLDrag::decode(e, uris) && (uris.count() > 0))
{
KURL *url = new KURL(uris.first());
KUrl *url = new KURL(uris.first());
if( KImageIO::types(KImageIO::Reading).contains(url->fileName()) )
return url;

View file

@ -70,7 +70,7 @@ private Q_SLOTS:
private:
void changeFace(const QPixmap& pix);
inline KURL* decodeImgDrop(QDropEvent *e, QWidget *wdg);
inline KUrl* decodeImgDrop(QDropEvent *e, QWidget *wdg);
KEMailSettings *_kes;
KUser *_ku;

View file

@ -507,7 +507,7 @@ static int directCommand(KCmdLineArgs *args)
dlg.exec();
if ( args->isSet("getsaveurl") ) {
KURL result = dlg.selectedURL();
KUrl result = dlg.selectedURL();
if ( result.isValid()) {
cout << result.url().local8Bit().data() << endl;
@ -533,7 +533,7 @@ static int directCommand(KCmdLineArgs *args)
result = QFileDialog::getExistingDirectory(startDir, 0, "getExistingDirectory",
title, true, true);
#else
KURL url;
KUrl url;
KDirSelectDialog myDialog( startDir, true, 0,
"kdirselect dialog", true );
@ -578,13 +578,13 @@ static int directCommand(KCmdLineArgs *args)
dlg.exec();
if (args->isSet("multiple")) {
KURL::List result = dlg.selectedURLs();
KUrl::List result = dlg.selectedURLs();
if ( !result.isEmpty() ) {
outputStringList( result.toStringList(), separateOutput );
return 0;
}
} else {
KURL result = dlg.selectedURL();
KUrl result = dlg.selectedURL();
if (!result.isEmpty()) {
cout << result.url().local8Bit().data() << endl;
return 0;

View file

@ -152,7 +152,7 @@ EditCommand::EditCommand(const QString & address, int col, const QString & newVa
{
if(mCol == 1)
{
KURL u = KURL::fromPathOrURL(newValue);
KUrl u = KUrl::fromPathOrURL(newValue);
mNewValue = u.url(0, 106);
}
else
@ -235,7 +235,7 @@ void EditCommand::modify(QString newValue)
{
if(mCol == 1)
{
KURL u = KURL::fromPathOrURL(newValue);
KUrl u = KUrl::fromPathOrURL(newValue);
mNewValue = u.url(0, 106);
}
else

View file

@ -68,7 +68,7 @@ public:
// bookmark
CreateCommand(const QString &address,
const QString &text, const QString &iconPath,
const KURL &url)
const KUrl &url)
: KCommand(), m_to(address), m_text(text), m_iconPath(iconPath), m_url(url),
m_group(false), m_separator(false), m_originalBookmark(QDomElement())
{ ; }
@ -99,7 +99,7 @@ private:
QString m_to;
QString m_text;
QString m_iconPath;
KURL m_url;
KUrl m_url;
bool m_group:1;
bool m_separator:1;
bool m_open:1;

View file

@ -97,8 +97,8 @@ void FavIconUpdater::downloadIconActual(const KBookmark &bk) {
m_browserIface = new FavIconBrowserInterface(this);
ext->setBrowserInterface(m_browserIface);
connect(ext, SIGNAL( setIconURL(const KURL &) ),
this, SLOT( setIconURL(const KURL &) ));
connect(ext, SIGNAL( setIconURL(const KUrl &) ),
this, SLOT( setIconURL(const KUrl &) ));
m_part = part;
}
@ -107,7 +107,7 @@ void FavIconUpdater::downloadIconActual(const KBookmark &bk) {
}
// khtml callback
void FavIconUpdater::setIconURL(const KURL &iconURL) {
void FavIconUpdater::setIconURL(const KUrl &iconURL) {
setIconForURL(m_bk.url(), iconURL);
}
@ -125,7 +125,7 @@ void FavIconUpdater::notifyChange(bool isHost, QString hostOrURL, QString iconNa
/* -------------------------- */
FavIconWebGrabber::FavIconWebGrabber(KParts::ReadOnlyPart *part, const KURL &url)
FavIconWebGrabber::FavIconWebGrabber(KParts::ReadOnlyPart *part, const KUrl &url)
: m_part(part), m_url(url) {
// kdDebug() << "FavIconWebGrabber::FavIconWebGrabber starting KIO::get()" << endl;

View file

@ -31,7 +31,7 @@ class FavIconWebGrabber : public QObject
{
Q_OBJECT
public:
FavIconWebGrabber(KParts::ReadOnlyPart *part, const KURL &url);
FavIconWebGrabber(KParts::ReadOnlyPart *part, const KUrl &url);
~FavIconWebGrabber() {}
protected Q_SLOTS:
@ -40,7 +40,7 @@ protected Q_SLOTS:
private:
KParts::ReadOnlyPart *m_part;
KURL m_url;
KUrl m_url;
};
class FavIconBrowserInterface;
@ -59,7 +59,7 @@ public:
QString iconName);
protected Q_SLOTS:
void setIconURL(const KURL &iconURL);
void setIconURL(const KUrl &iconURL);
void slotCompleted();
Q_SIGNALS:

View file

@ -98,7 +98,7 @@ Kfind::~Kfind()
kdDebug() << "Kfind::~Kfind" << endl;
}
void Kfind::setURL( const KURL &url )
void Kfind::setURL( const KUrl &url )
{
tabWidget->setURL( url );
}

View file

@ -26,7 +26,7 @@ public:
Kfind(QWidget * parent = 0, const char * name = 0);
~Kfind();
void setURL( const KURL &url );
void setURL( const KUrl &url );
void setQuery(KQuery * q) { query = q; }
void searchFinished();

View file

@ -23,7 +23,7 @@
#include "kfinddlg.h"
#include "kfinddlg.moc"
KfindDlg::KfindDlg(const KURL & url, QWidget *parent, const char *name)
KfindDlg::KfindDlg(const KUrl & url, QWidget *parent, const char *name)
: KDialogBase( Plain, QString(),
User1 | User2 | Apply | Close | Help, Apply,
parent, name, true, true,

View file

@ -25,7 +25,7 @@ class KfindDlg: public KDialogBase
Q_OBJECT
public:
KfindDlg(const KURL & url, QWidget * parent = 0, const char * name = 0);
KfindDlg(const KUrl & url, QWidget * parent = 0, const char * name = 0);
~KfindDlg();
void copySelection();

View file

@ -81,7 +81,7 @@ KAboutData *KFindPart::createAboutData()
return new KAboutData( "kfindpart", I18N_NOOP( "Find Component" ), "1.0" );
}
bool KFindPart::doOpenURL( const KURL &url )
bool KFindPart::doOpenURL( const KUrl &url )
{
m_kfindWidget->setURL( url );
return true;
@ -189,7 +189,7 @@ void KFindPart::restoreState( QDataStream& stream )
{
KonqDirPart::restoreState(stream);
int nbitems;
KURL itemUrl;
KUrl itemUrl;
m_kfindWidget->restoreState( &stream );

View file

@ -50,7 +50,7 @@ public:
static KAboutData *createAboutData();
virtual bool doOpenURL( const KURL &url );
virtual bool doOpenURL( const KUrl &url );
virtual bool doCloseURL() { return true; }
virtual bool openFile() { return false; }
@ -60,7 +60,7 @@ public:
virtual void restoreState( QDataStream &stream );
// "Cut" icons : disable those whose URL is in lst, enable the rest //added for konqdirpart
virtual void disableIcons( const KURL::List & ){};
virtual void disableIcons( const KUrl::List & ){};
virtual const KFileItem * currentItem(){return 0;};
Q_SIGNALS:
@ -89,7 +89,7 @@ protected Q_SLOTS:
virtual void slotDeleteItem( KFileItem * ){};
virtual void slotRefreshItems( const KFileItemList& ){};
virtual void slotClear(){};
virtual void slotRedirection( const KURL & ){};
virtual void slotRedirection( const KUrl & ){};
private:
Kfind * m_kfindWidget;

View file

@ -389,7 +389,7 @@ KfindTabWidget::~KfindTabWidget()
delete pages[2];
}
void KfindTabWidget::setURL( const KURL & url )
void KfindTabWidget::setURL( const KUrl & url )
{
KConfig *conf = KGlobal::config();
conf->setGroup("History");

View file

@ -47,7 +47,7 @@ public:
void saveHistory();
bool isSearchRecursive();
void setURL( const KURL & url );
void setURL( const KUrl & url );
public Q_SLOTS:
void setFocus();
@ -109,7 +109,7 @@ private:
QCheckBox *regexpContentCb;
QDialog *regExpDialog;
KURL m_url;
KUrl m_url;
KMimeType::List m_types;
QStringList m_ImageTypes;

View file

@ -156,7 +156,7 @@ QString KfindWindow::reducedDir(const QString& fullDir)
return fullDir;
}
void KfindWindow::beginSearch(const KURL& baseUrl)
void KfindWindow::beginSearch(const KUrl& baseUrl)
{
kdDebug()<<QString("beginSearch in: %1").arg(baseUrl.path())<<endl;
m_baseDir=baseUrl.path(+1);
@ -205,7 +205,7 @@ void KfindWindow::saveResults()
dlg->exec();
KURL u = dlg->selectedURL();
KUrl u = dlg->selectedURL();
KMimeType::Ptr mimeType = dlg->currentFilterMimeType();
delete dlg;
@ -314,7 +314,7 @@ void KfindWindow::fileProperties()
void KfindWindow::openFolder()
{
KFileItem fileitem = ((KfFileLVI *)currentItem())->fileitem;
KURL url = fileitem.url();
KUrl url = fileitem.url();
url.setFileName(QString());
(void) new KRun(url, this);
@ -342,7 +342,7 @@ void KfindWindow::resizeEvent(QResizeEvent *e)
Q3DragObject * KfindWindow::dragObject()
{
KURL::List uris;
KUrl::List uris;
QList<Q3ListViewItem*> selected = selectedItems();
// create a list of URIs from selection
@ -431,5 +431,5 @@ void KfindWindow::slotContextMenu(KListView *,Q3ListViewItem *item,const QPoint&
void KfindWindow::slotOpenWith()
{
KRun::displayOpenWithDialog( KURL::split(((KfFileLVI*)currentItem())->fileitem.url()) );
KRun::displayOpenWithDialog( KUrl::split(((KfFileLVI*)currentItem())->fileitem.url()) );
}

View file

@ -35,7 +35,7 @@ class KfindWindow: public KListView
public:
KfindWindow( QWidget * parent = 0 );
void beginSearch(const KURL& baseUrl);
void beginSearch(const KUrl& baseUrl);
void endSearch();
void insertItem(const KFileItem &item, const QString& matchingLine);

View file

@ -459,7 +459,7 @@ void KQuery::setRecursive(bool recursive)
m_recursive = recursive;
}
void KQuery::setPath(const KURL &url)
void KQuery::setPath(const KUrl &url)
{
m_url = url;
}

View file

@ -28,7 +28,7 @@ class KQuery : public QObject
void setTimeRange( time_t from, time_t to );
void setRegExp( const QString &regexp, bool caseSensitive );
void setRecursive( bool recursive );
void setPath(const KURL & url );
void setPath(const KUrl & url );
void setFileType( int filetype );
void setMimeType( const QStringList & mimetype );
void setContext( const QString & context, bool casesensitive,
@ -40,7 +40,7 @@ class KQuery : public QObject
void start();
void kill();
const KURL& url() {return m_url;};
const KUrl& url() {return m_url;};
private:
/* Check if file meets the find's requirements*/
@ -68,7 +68,7 @@ class KQuery : public QObject
int m_filetype;
int m_minsize;
int m_maxsize;
KURL m_url;
KUrl m_url;
time_t m_timeFrom;
time_t m_timeTo;
QRegExp m_regexp;// regexp for file content

View file

@ -49,7 +49,7 @@ int main( int argc, char ** argv )
KCmdLineArgs *args= KCmdLineArgs::parsedArgs();
KURL url;
KUrl url;
if (args->count() > 0)
url = args->url(0);
if (url.isEmpty())

View file

@ -35,7 +35,7 @@ KonqViewIface::~KonqViewIface()
void KonqViewIface::openURL( QString url, const QString & locationBarURL, const QString & nameFilter )
{
KURL u(url);
KUrl u(url);
m_pView->openURL( u, locationBarURL, nameFilter );
}

View file

@ -99,7 +99,7 @@ DCOPRef KonquerorIface::createNewWindow( const QString &url, const QString &mime
KParts::URLArgs args;
args.serviceType = mimetype;
// Filter the URL, so that "kfmclient openURL gg:foo" works also when konq is already running
KURL finalURL = KonqMisc::konqFilteredURL( 0, url );
KUrl finalURL = KonqMisc::konqFilteredURL( 0, url );
KonqMainWindow *res = KonqMisc::createNewWindow( finalURL, args, false, QStringList(), tempFile );
if ( !res )
return DCOPRef();

View file

@ -423,7 +423,7 @@ KonqAboutPage::~KonqAboutPage()
{
}
bool KonqAboutPage::openURL( const KURL &u )
bool KonqAboutPage::openURL( const KUrl &u )
{
if (u.url() == "about:plugins")
serve( KonqAboutPageFactory::plugins(), "plugins" );
@ -460,7 +460,7 @@ void KonqAboutPage::serve( const QString& html, const QString& what )
void KonqAboutPage::urlSelected( const QString &url, int button, int state, const QString &target, KParts::URLArgs _args )
{
KURL u( url );
KUrl u( url );
if ( u.protocol() == "exec" )
{
QStringList args = QStringList::split( QChar( ' ' ), url.mid( 6 ) );

View file

@ -41,7 +41,7 @@ public:
QObject *parent, const char *name );
~KonqAboutPage();
virtual bool openURL( const KURL &url );
virtual bool openURL( const KUrl &url );
virtual bool openFile();

View file

@ -319,7 +319,7 @@ void clientApp::sendASNChange()
XCloseDisplay( dpy );
}
bool clientApp::createNewWindow(const KURL & url, bool newTab, bool tempFile, const QString & mimetype)
bool clientApp::createNewWindow(const KUrl & url, bool newTab, bool tempFile, const QString & mimetype)
{
kdDebug( 1202 ) << "clientApp::createNewWindow " << url.url() << " mimetype=" << mimetype << endl;
needInstance();
@ -502,7 +502,7 @@ bool clientApp::doIt()
bool tempFile = KCmdLineArgs::isTempFileSet();
if ( argc == 1 )
{
KURL url;
KUrl url;
url.setPath(QDir::homePath());
return createNewWindow( url, command == "newTab", tempFile );
}
@ -549,7 +549,7 @@ bool clientApp::doIt()
}
else if ( argc == 3 )
{
KURL::List urls;
KUrl::List urls;
urls.append( args->url(1) );
const KTrader::OfferList offers = KTrader::self()->query( QString::fromLocal8Bit( args->arg( 2 ) ), QLatin1String( "Application" ), QString(), QString() );
if (offers.isEmpty()) return 1;
@ -560,7 +560,7 @@ bool clientApp::doIt()
else if ( command == "move" )
{
checkArgumentCount(argc, 2, 0);
KURL::List srcLst;
KUrl::List srcLst;
for ( int i = 1; i <= argc - 2; i++ )
srcLst.append( args->url(i) );
@ -574,10 +574,10 @@ bool clientApp::doIt()
else if ( command == "download" )
{
checkArgumentCount(argc, 0, 0);
KURL::List srcLst;
KUrl::List srcLst;
if (argc == 1) {
while(true) {
KURL src = KUrlRequesterDlg::getURL();
KUrl src = KUrlRequesterDlg::getURL();
if (!src.isEmpty()) {
if (!src.isValid()) {
KMessageBox::error(0, i18n("Unable to download from an invalid URL."));
@ -597,7 +597,7 @@ bool clientApp::doIt()
KFileDialog::getSaveFileName( (argc<2) ? (QString::null) : (args->url(1).fileName()) );
if (dst.isEmpty()) // cancelled
return m_ok; // AK - really okay?
KURL dsturl;
KUrl dsturl;
dsturl.setPath( dst );
KIO::Job * job = KIO::copy( srcLst, dsturl );
if ( !s_interactive )
@ -609,7 +609,7 @@ bool clientApp::doIt()
else if ( command == "copy" )
{
checkArgumentCount(argc, 2, 0);
KURL::List srcLst;
KUrl::List srcLst;
for ( int i = 1; i <= argc - 2; i++ )
srcLst.append( args->url(i) );

View file

@ -33,7 +33,7 @@ public:
static bool doIt();
/** Make konqueror open a window for @p url */
static bool createNewWindow(const KURL & url, bool newTab, bool tempFile, const QString & mimetype = QString());
static bool createNewWindow(const KUrl & url, bool newTab, bool tempFile, const QString & mimetype = QString());
/** Make konqueror open a window for @p profile, @p url and @p mimetype */
static bool openProfile(const QString & profile, const QString & url, const QString & mimetype = QString());

View file

@ -121,7 +121,7 @@ const KFileItem* KonqPart::currentItem()
return m_model->fileItem( m_view->currentIndex() );
}
bool KonqPart::doOpenURL( const KURL& url )
bool KonqPart::doOpenURL( const KUrl& url )
{
emit setWindowCaption( url.pathOrURL() );
KParts::URLArgs args = extension()->urlArgs();

View file

@ -46,7 +46,7 @@ private:
protected Q_SLOTS:
virtual void slotNewItems( const KFileItemList& );
virtual bool openFile() { return true; }
virtual void disableIcons( const KURL::List& ) {}
virtual void disableIcons( const KUrl::List& ) {}
virtual const KFileItem* currentItem();
virtual void slotStarted() {}
virtual void slotCanceled() {}
@ -54,8 +54,8 @@ protected Q_SLOTS:
virtual void slotDeleteItem( KFileItem* ) {}
virtual void slotRefreshItems( const KFileItemList& ) {}
virtual void slotClear();
virtual void slotRedirection( const KURL& ) {}
virtual bool doOpenURL( const KURL& );
virtual void slotRedirection( const KUrl& ) {}
virtual bool doOpenURL( const KUrl& );
virtual bool doCloseURL() { return true; }
private Q_SLOTS:
void slotExecute( const QModelIndex& index, Qt::MouseButton mb );

View file

@ -359,10 +359,10 @@ KonqKfmIconView::KonqKfmIconView( QWidget *parentWidget, QObject *parent, const
setDirLister( m_dirLister );
m_dirLister->setMainWindow(m_pIconView->topLevelWidget());
connect( m_dirLister, SIGNAL( started( const KURL & ) ),
connect( m_dirLister, SIGNAL( started( const KUrl & ) ),
this, SLOT( slotStarted() ) );
connect( m_dirLister, SIGNAL( completed() ), this, SLOT( slotCompleted() ) );
connect( m_dirLister, SIGNAL( canceled( const KURL& ) ), this, SLOT( slotCanceled( const KURL& ) ) );
connect( m_dirLister, SIGNAL( canceled( const KUrl& ) ), this, SLOT( slotCanceled( const KUrl& ) ) );
connect( m_dirLister, SIGNAL( clear() ), this, SLOT( slotClear() ) );
connect( m_dirLister, SIGNAL( newItems( const KFileItemList& ) ),
this, SLOT( slotNewItems( const KFileItemList& ) ) );
@ -370,8 +370,8 @@ KonqKfmIconView::KonqKfmIconView( QWidget *parentWidget, QObject *parent, const
this, SLOT( slotDeleteItem( KFileItem * ) ) );
connect( m_dirLister, SIGNAL( refreshItems( const KFileItemList& ) ),
this, SLOT( slotRefreshItems( const KFileItemList& ) ) );
connect( m_dirLister, SIGNAL( redirection( const KURL & ) ),
this, SLOT( slotRedirection( const KURL & ) ) );
connect( m_dirLister, SIGNAL( redirection( const KUrl & ) ),
this, SLOT( slotRedirection( const KUrl & ) ) );
connect( m_dirLister, SIGNAL( itemsFilteredByMime(const KFileItemList& ) ),
SIGNAL( itemsFilteredByMime(const KFileItemList& ) ) );
connect( m_dirLister, SIGNAL( infoMessage( const QString& ) ),
@ -776,7 +776,7 @@ void KonqKfmIconView::slotContextMenuRequested(Q3IconViewItem* _item, const QPoi
KFileItem * rootItem = m_dirLister->rootItem();
if ( rootItem ) {
KURL parentDirURL = rootItem->url();
KUrl parentDirURL = rootItem->url();
// Check if parentDirURL applies to the selected items (usually yes, but not with search results)
KFileItemList::const_iterator kit = items.begin();
const KFileItemList::const_iterator kend = items.end();
@ -852,7 +852,7 @@ void KonqKfmIconView::slotCanceled()
slotCanceled( m_pIconView->url() );
}
void KonqKfmIconView::slotCanceled( const KURL& url )
void KonqKfmIconView::slotCanceled( const KUrl& url )
{
// Check if this canceled() signal is about the URL we're listing.
// It could be about the URL we were listing, and openURL() aborted it.
@ -1170,7 +1170,7 @@ void KonqKfmIconView::slotClear()
slotSelectionChanged();
}
void KonqKfmIconView::slotRedirection( const KURL & url )
void KonqKfmIconView::slotRedirection( const KUrl & url )
{
const QString prettyURL = url.pathOrURL();
emit m_extension->setLocationBarURL( prettyURL );
@ -1244,7 +1244,7 @@ void KonqKfmIconView::slotRefreshViewport()
vp->setUpdatesEnabled( prevState );
}
bool KonqKfmIconView::doOpenURL( const KURL & url )
bool KonqKfmIconView::doOpenURL( const KUrl & url )
{
// Store url in the icon view
m_pIconView->setURL( url );
@ -1410,7 +1410,7 @@ QString KonqKfmIconView::makeSizeKey( KFileIVI *item )
return KIO::number( item->item()->size() ).rightJustified( 20, '0' );
}
void KonqKfmIconView::disableIcons( const KURL::List & lst )
void KonqKfmIconView::disableIcons( const KUrl::List & lst )
{
m_pIconView->disableIcons( lst );
}
@ -1466,7 +1466,7 @@ void SpringLoadingManager::springLoadTrigger(KonqKfmIconView *view,
item->setSelected( false, true );
view->iconViewWidget()->visualActivate(item);
KURL url = file->url();
KUrl url = file->url();
KParts::URLArgs args;
file->determineMimeType();
@ -1512,7 +1512,7 @@ void SpringLoadingManager::finished()
{
kdDebug() << "SpringLoadManager::finished()" << endl;
KURL url = m_startURL;
KUrl url = m_startURL;
m_startURL = KURL();
KParts::ReadOnlyPart *part = m_startPart;

View file

@ -66,7 +66,7 @@ public:
QString viewMode() const { return m_mode; }
// "Cut" icons : disable those whose URL is in lst, enable the rest
virtual void disableIcons( const KURL::List & lst );
virtual void disableIcons( const KUrl::List & lst );
// See KMimeTypeResolver
void mimeTypeDeterminationFinished();
@ -112,13 +112,13 @@ protected Q_SLOTS:
// They are reimplemented from KonqDirPart.
virtual void slotStarted();
virtual void slotCanceled();
void slotCanceled( const KURL& url );
void slotCanceled( const KUrl& url );
virtual void slotCompleted();
virtual void slotNewItems( const KFileItemList& );
virtual void slotDeleteItem( KFileItem * );
virtual void slotRefreshItems( const KFileItemList& );
virtual void slotClear();
virtual void slotRedirection( const KURL & );
virtual void slotRedirection( const KUrl & );
virtual void slotDirectoryOverlayStart();
virtual void slotDirectoryOverlayFinished();
@ -136,7 +136,7 @@ protected Q_SLOTS:
protected:
virtual bool openFile() { return true; }
virtual bool doOpenURL( const KURL& );
virtual bool doOpenURL( const KUrl& );
virtual bool doCloseURL();
virtual void newIconSize( int size );
@ -250,7 +250,7 @@ public Q_SLOTS:
void cut() { m_iconView->iconViewWidget()->cutSelection(); }
void copy() { m_iconView->iconViewWidget()->copySelection(); }
void paste() { m_iconView->iconViewWidget()->pasteSelection(); }
void pasteTo( const KURL &u ) { m_iconView->iconViewWidget()->paste( u ); }
void pasteTo( const KUrl &u ) { m_iconView->iconViewWidget()->paste( u ); }
void trash();
void del() { KonqOperations::del(m_iconView->iconViewWidget(),
@ -287,7 +287,7 @@ private Q_SLOTS:
void finished();
private:
KURL m_startURL;
KUrl m_startURL;
KParts::ReadOnlyPart *m_startPart;
// Timer allowing to know the user wants to abort the spring loading

View file

@ -483,7 +483,7 @@ void KonqMostOftenURLSAction::slotActivated( int id )
Q_ASSERT( !m_popupList.isEmpty() ); // can not happen
Q_ASSERT( id < (int)m_popupList.count() );
KURL url = m_popupList[ id ];
KUrl url = m_popupList[ id ];
if ( url.isValid() )
emit activated( url );
else

View file

@ -137,7 +137,7 @@ public:
virtual ~KonqMostOftenURLSAction();
Q_SIGNALS:
void activated( const KURL& );
void activated( const KUrl& );
private Q_SLOTS:
void slotHistoryCleared();
@ -155,7 +155,7 @@ private:
static MostOftenList *s_mostEntries;
static uint s_maxEntries;
KURL::List m_popupList;
KUrl::List m_popupList;
};
#endif

View file

@ -49,12 +49,12 @@ const int KonqCombo::temporary = 0;
#warning "This needs massive porting, mostly stubbed out"
#endif
static QString titleOfURL( const KURL& url )
static QString titleOfURL( const KUrl& url )
{
KonqHistoryList historylist = KonqHistoryManager::kself()->entries();
KonqHistoryEntry *historyentry = historylist.findEntry( url );
if ( !historyentry && !url.url().endsWith( "/" ) ) {
KURL _url = url;
KUrl _url = url;
_url.setPath( url.path()+'/' );
historyentry = historylist.findEntry( _url );
}
@ -579,7 +579,7 @@ void KonqCombo::mouseMoveEvent( QMouseEvent *e )
(e->pos() - m_dragStart).manhattanLength() >
KGlobalSettings::dndEventDelay() )
{
KURL url ( currentText() );
KUrl url ( currentText() );
if ( url.isValid() )
{
QDrag* drag = new QDrag(this);

View file

@ -108,7 +108,7 @@ extern "C" KDE_EXPORT int kdemain( int argc, char **argv )
QStringList filesToSelect;
if (args->count() == 1)
url = QString::fromLocal8Bit(args->arg(0));
KURL kurl(url);
KUrl kurl(url);
KParts::URLArgs urlargs;
if (args->isSet("mimetype"))
urlargs.serviceType = QString::fromLocal8Bit(args->getOption("mimetype"));
@ -162,13 +162,13 @@ extern "C" KDE_EXPORT int kdemain( int argc, char **argv )
}
else
{
KURL::List urlList;
KUrl::List urlList;
KonqMainWindow * mainwin = 0L;
for ( int i = 0; i < args->count(); i++ )
{
// KonqMisc::konqFilteredURL doesn't cope with local files... A bit of hackery below
KURL url = args->url(i);
KURL urlToOpen;
KUrl url = args->url(i);
KUrl urlToOpen;
QStringList filesToSelect;
if (url.isLocalFile() && QFile::exists(url.path())) // "konqueror index.html"

View file

@ -152,7 +152,7 @@ KonqExtendedBookmarkOwner::KonqExtendedBookmarkOwner(KonqMainWindow *w)
m_pKonqMainWindow = w;
}
KonqMainWindow::KonqMainWindow( const KURL &initialURL, bool openInitialURL, const char *name, const QString& xmluiFile)
KonqMainWindow::KonqMainWindow( const KUrl &initialURL, bool openInitialURL, const char *name, const QString& xmluiFile)
: KParts::MainWindow( NoDCOPObject, 0L, name, Qt::WDestructiveClose | Qt::WStyle_ContextHelp )
{
setPreloadedFlag( false );
@ -275,7 +275,7 @@ KonqMainWindow::KonqMainWindow( const KURL &initialURL, bool openInitialURL, con
}
else if ( openInitialURL )
{
KURL homeURL;
KUrl homeURL;
homeURL.setPath( QDir::homePath() );
openURL( 0L, homeURL );
}
@ -414,7 +414,7 @@ void KonqMainWindow::removeContainer( QWidget *container, QWidget *parent, QDomE
// Note that KShortURIFilter does the same, but we have no way of getting it from there
//
// Note: this removes the filter from the URL.
QString KonqMainWindow::detectNameFilter( KURL & url )
QString KonqMainWindow::detectNameFilter( KUrl & url )
{
if ( !KProtocolInfo::supportsListing(url) )
return QString();
@ -452,7 +452,7 @@ void KonqMainWindow::openFilteredURL( const QString & url, KonqOpenURLRequest &
if (m_currentDir.isEmpty() && m_currentView)
m_currentDir = m_currentView->url().path(1);
KURL filteredURL ( KonqMisc::konqFilteredURL( this, url, m_currentDir ) );
KUrl filteredURL ( KonqMisc::konqFilteredURL( this, url, m_currentDir ) );
kdDebug(1202) << "url " << url << " filtered into " << filteredURL.prettyURL() << endl;
if ( filteredURL.isEmpty() ) // initially empty, or error (e.g. ~unknown_user)
@ -480,7 +480,7 @@ void KonqMainWindow::openFilteredURL( const QString & _url, bool inNewTab, bool
openFilteredURL( _url, req );
}
void KonqMainWindow::openURL( KonqView *_view, const KURL &_url,
void KonqMainWindow::openURL( KonqView *_view, const KUrl &_url,
const QString &_serviceType, KonqOpenURLRequest& req,
bool trustedSource )
{
@ -490,7 +490,7 @@ void KonqMainWindow::openURL( KonqView *_view, const KURL &_url,
<< "' view=" << _view << endl;
#endif
KURL url( _url );
KUrl url( _url );
QString serviceType( _serviceType );
if ( url.url() == "about:blank" )
{
@ -602,7 +602,7 @@ void KonqMainWindow::openURL( KonqView *_view, const KURL &_url,
}
if ( open )
{
KURL::List lst;
KUrl::List lst;
lst.append(url);
//kdDebug(1202) << "Got offer " << (offer ? offer->name().toLatin1() : "0") << endl;
if ( ( trustedSource || KonqRun::allowExecution( serviceType, url ) ) &&
@ -649,7 +649,7 @@ void KonqMainWindow::openURL( KonqView *_view, const KURL &_url,
}
}
bool KonqMainWindow::openView( QString serviceType, const KURL &_url, KonqView *childView, KonqOpenURLRequest& req )
bool KonqMainWindow::openView( QString serviceType, const KUrl &_url, KonqView *childView, KonqOpenURLRequest& req )
{
// Second argument is referring URL
if ( !KAuthorized::authorizeURLAction("open", childView ? childView->url() : KURL(), _url) )
@ -694,7 +694,7 @@ bool KonqMainWindow::openView( QString serviceType, const KURL &_url, KonqView *
QString indexFile;
KURL url( _url );
KUrl url( _url );
// Generic mechanism for redirecting to tar:/<path>/ when clicking on a tar file,
// zip:/<path>/ when clicking on a zip file, etc.
@ -762,7 +762,7 @@ bool KonqMainWindow::openView( QString serviceType, const KURL &_url, KonqView *
if ( url.isLocalFile() ) // local, we can do better (.directory)
{
// Read it in the .directory file, default to m_bHTMLAllowed
KURL urlDotDir( url );
KUrl urlDotDir( url );
urlDotDir.addPath(".directory");
bool HTMLAllowed = m_bHTMLAllowed;
QFile f( urlDotDir.path() );
@ -899,7 +899,7 @@ bool KonqMainWindow::openView( QString serviceType, const KURL &_url, KonqView *
return ok || bOthersFollowed;
}
void KonqMainWindow::slotOpenURLRequest( const KURL &url, const KParts::URLArgs &args )
void KonqMainWindow::slotOpenURLRequest( const KUrl &url, const KParts::URLArgs &args )
{
kdDebug(1202) << "KonqMainWindow::slotOpenURLRequest frameName=" << args.frameName << endl;
@ -956,7 +956,7 @@ void KonqMainWindow::slotOpenURLRequest( const KURL &url, const KParts::URLArgs
}
//Called by slotOpenURLRequest
void KonqMainWindow::openURL( KonqView *childView, const KURL &url, const KParts::URLArgs &args )
void KonqMainWindow::openURL( KonqView *childView, const KUrl &url, const KParts::URLArgs &args )
{
kdDebug(1202) << "KonqMainWindow::openURL (from slotOpenURLRequest) url=" << url.prettyURL() << endl;
KonqOpenURLRequest req;
@ -994,7 +994,7 @@ QObject *KonqMainWindow::lastFrame( KonqView *view )
}
// Linked-views feature, plus "sidebar follows URL opened in the active view" feature
bool KonqMainWindow::makeViewsFollow( const KURL & url, const KParts::URLArgs &args,
bool KonqMainWindow::makeViewsFollow( const KUrl & url, const KParts::URLArgs &args,
const QString & serviceType, KonqView * senderView )
{
if ( !senderView->isLinkedView() && senderView != m_currentView )
@ -1076,7 +1076,7 @@ void KonqMainWindow::abortLoading()
}
}
void KonqMainWindow::slotCreateNewWindow( const KURL &url, const KParts::URLArgs &args )
void KonqMainWindow::slotCreateNewWindow( const KUrl &url, const KParts::URLArgs &args )
{
kdDebug(1202) << "KonqMainWindow::slotCreateNewWindow url=" << url.prettyURL() << endl;
@ -1099,7 +1099,7 @@ void KonqMainWindow::slotCreateNewWindow( const KURL &url, const KParts::URLArgs
}
// This is mostly for the JS window.open call
void KonqMainWindow::slotCreateNewWindow( const KURL &url, const KParts::URLArgs &args,
void KonqMainWindow::slotCreateNewWindow( const KUrl &url, const KParts::URLArgs &args,
const KParts::WindowArgs &windowArgs, KParts::ReadOnlyPart *&part )
{
kdDebug(1202) << "KonqMainWindow::slotCreateNewWindow(4 args) url=" << url.prettyURL()
@ -1309,10 +1309,10 @@ void KonqMainWindow::slotDuplicateWindow()
void KonqMainWindow::slotSendURL()
{
KURL::List lst = currentURLs();
KUrl::List lst = currentURLs();
QString body;
QString fileNameList;
for ( KURL::List::Iterator it = lst.begin() ; it != lst.end() ; ++it )
for ( KUrl::List::Iterator it = lst.begin() ; it != lst.end() ; ++it )
{
if ( !body.isEmpty() ) body += '\n';
body += (*it).prettyURL();
@ -1330,10 +1330,10 @@ void KonqMainWindow::slotSendURL()
void KonqMainWindow::slotSendFile()
{
KURL::List lst = currentURLs();
KUrl::List lst = currentURLs();
QStringList urls;
QString fileNameList;
for ( KURL::List::Iterator it = lst.begin() ; it != lst.end() ; ++it )
for ( KUrl::List::Iterator it = lst.begin() ; it != lst.end() ; ++it )
{
if ( !fileNameList.isEmpty() ) fileNameList += ", ";
if ( (*it).isLocalFile() && QFileInfo((*it).path()).isDir() )
@ -1379,7 +1379,7 @@ void KonqMainWindow::slotOpenTerminal()
//Try to get the directory of the current view
if ( m_currentView )
{
KURL u( m_currentView->url() );
KUrl u( m_currentView->url() );
// If the given directory is not local, it can still be the URL of an
// ioslave using UDS_LOCAL_PATH which to be converted first.
@ -1424,7 +1424,7 @@ void KonqMainWindow::slotOpenLocation()
dlg.urlRequester()->completionObject()->setDir( currentDir );
dlg.urlRequester()->setMode( KFile::File | KFile::Directory | KFile::ExistingOnly );
dlg.exec();
const KURL& url = dlg.selectedURL();
const KUrl& url = dlg.selectedURL();
if (!url.isEmpty())
openFilteredURL( url.url().trimmed() );
}
@ -1463,7 +1463,7 @@ void KonqMainWindow::slotToolFind()
}
else if ( sender()->inherits( "KAction" ) ) // don't go there if called by the singleShot below
{
KURL url;
KUrl url;
if ( m_currentView && m_currentView->url().isLocalFile() )
url = m_currentView->locationBarURL();
else
@ -1506,7 +1506,7 @@ void KonqMainWindow::slotIconsChanged()
void KonqMainWindow::slotOpenWith()
{
KURL::List lst;
KUrl::List lst;
lst.append( m_currentView->url() );
QString serviceName = sender()->name();
@ -1542,7 +1542,7 @@ void KonqMainWindow::slotViewModeToggle( bool toggle )
m_currentView->lockHistory();
// Save those, because changeViewMode will lose them
KURL url = m_currentView->url();
KUrl url = m_currentView->url();
QString locationBarURL = m_currentView->locationBarURL();
QStringList filesToSelect;
if( m_currentView->part()->inherits( "KonqDirPart" ) ) {
@ -1623,7 +1623,7 @@ void KonqMainWindow::slotViewModeToggle( bool toggle )
if ( !bQuickViewModeChange )
{
m_currentView->changeViewMode( m_currentView->serviceType(), modeName );
KURL locURL = KURL::fromPathOrURL( locationBarURL );
KUrl locURL = KUrl::fromPathOrURL( locationBarURL );
QString nameFilter = detectNameFilter( locURL );
if( m_currentView->part()->inherits( "KonqDirPart" ) )
static_cast<KonqDirPart*>( m_currentView->part() )->setFilesToSelect( filesToSelect );
@ -1635,7 +1635,7 @@ void KonqMainWindow::slotViewModeToggle( bool toggle )
// once we do, we might want to implement per-mimetype global-saving)
if ( m_bSaveViewPropertiesLocally && m_currentView->supportsServiceType( "inode/directory" ) )
{
KURL u ( m_currentView->url() );
KUrl u ( m_currentView->url() );
u.addPath(".directory");
if ( u.isLocalFile() )
{
@ -1661,7 +1661,7 @@ void KonqMainWindow::showHTML( KonqView * _view, bool b, bool _activateView )
// This has to be done before calling openView since it relies on it
if ( m_bSaveViewPropertiesLocally )
{
KURL u ( b ? _view->url() : KURL( _view->url().directory() ) );
KUrl u ( b ? _view->url() : KURL( _view->url().directory() ) );
u.addPath(".directory");
if ( u.isLocalFile() )
{
@ -1685,7 +1685,7 @@ void KonqMainWindow::showHTML( KonqView * _view, bool b, bool _activateView )
}
else if ( !b && _view->supportsServiceType( "text/html" ) )
{
KURL u( _view->url() );
KUrl u( _view->url() );
QString fileName = u.fileName().lower();
if ( KProtocolInfo::supportsListing( u ) && fileName.startsWith("index.htm") ) {
_view->lockHistory();
@ -1806,7 +1806,7 @@ void KonqMainWindow::slotHome(KAction::ActivationReason, Qt::MouseButtons button
openFilteredURL( homeURL, req);
else
{
KURL finalURL = KonqMisc::konqFilteredURL( this, homeURL );
KUrl finalURL = KonqMisc::konqFilteredURL( this, homeURL );
KonqMisc::createNewWindow( finalURL.url() );
}
}
@ -1847,7 +1847,7 @@ void KonqMainWindow::slotGoSettings()
void KonqMainWindow::slotGoDirTree()
{
KURL u;
KUrl u;
u.setPath( locateLocal( "data", "konqueror/dirtree/" ) );
openURL( 0L, u );
}
@ -1859,7 +1859,7 @@ void KonqMainWindow::slotGoTrash()
void KonqMainWindow::slotGoAutostart()
{
KURL u;
KUrl u;
u.setPath( KGlobalSettings::autostartPath() );
openURL( 0L, u );
}
@ -2082,7 +2082,7 @@ void KonqMainWindow::slotViewCompleted( KonqView * view )
// changes the directory!! (DA)
if( m_pURLCompletion )
{
KURL u( view->locationBarURL() );
KUrl u( view->locationBarURL() );
if( u.isLocalFile() )
m_pURLCompletion->setDir( u.path() );
else
@ -2685,10 +2685,10 @@ void KonqMainWindow::popupNewTab(bool infront, bool openAfterCurrentPage)
}
}
void KonqMainWindow::openMultiURL( KURL::List url )
void KonqMainWindow::openMultiURL( KUrl::List url )
{
KURL::List::ConstIterator it = url.begin();
KURL::List::ConstIterator end = url.end();
KUrl::List::ConstIterator it = url.begin();
KUrl::List::ConstIterator end = url.end();
for (; it != end; ++it )
{
KonqView* newView = m_pViewManager->addTab();
@ -2866,7 +2866,7 @@ void KonqMainWindow::slotSaveViewPropertiesLocally()
void KonqMainWindow::slotRemoveLocalProperties()
{
assert( m_currentView );
KURL u ( m_currentView->url() );
KUrl u ( m_currentView->url() );
u.addPath(".directory");
if ( u.isLocalFile() )
{
@ -2888,9 +2888,9 @@ void KonqMainWindow::slotRemoveLocalProperties()
}
}
bool KonqMainWindow::askForTarget(const QString& text, KURL& url)
bool KonqMainWindow::askForTarget(const QString& text, KUrl& url)
{
const KURL initialUrl = (viewCount()==2) ? otherView(m_currentView)->url() : m_currentView->url();
const KUrl initialUrl = (viewCount()==2) ? otherView(m_currentView)->url() : m_currentView->url();
QString label = text.arg( m_currentView->url().pathOrURL() );
KUrlRequesterDlg dlg(initialUrl.pathOrURL(), label, this, "urlrequester", true);
dlg.setCaption(i18n("Enter Target"));
@ -2917,7 +2917,7 @@ void KonqMainWindow::slotRequesterClicked( KUrlRequester *req )
void KonqMainWindow::slotCopyFiles()
{
//kdDebug(1202) << "KonqMainWindow::slotCopyFiles()" << endl;
KURL dest;
KUrl dest;
if (!askForTarget(i18n("Copy selected files from %1 to:"),dest))
return;
@ -2927,7 +2927,7 @@ void KonqMainWindow::slotCopyFiles()
void KonqMainWindow::slotMoveFiles()
{
//kdDebug(1202) << "KonqMainWindow::slotMoveFiles()" << endl;
KURL dest;
KUrl dest;
if (!askForTarget(i18n("Move selected files from %1 to:"),dest))
return;
@ -2941,9 +2941,9 @@ void KonqMainWindow::slotNewDir()
KonqOperations::newDir(this, m_currentView->url());
}
KURL::List KonqMainWindow::currentURLs() const
KUrl::List KonqMainWindow::currentURLs() const
{
KURL::List urls;
KUrl::List urls;
if ( m_currentView )
{
urls.append( m_currentView->url() );
@ -2999,7 +2999,7 @@ void KonqMainWindow::slotUpAboutToShow()
// Use the location bar URL, because in case we display a index.html
// we want to go up from the dir, not from the index.html
KURL u( m_currentView->locationBarURL() );
KUrl u( m_currentView->locationBarURL() );
u = u.upURL();
while ( u.hasPath() )
{
@ -3058,7 +3058,7 @@ void KonqMainWindow::slotUpDelayed()
void KonqMainWindow::slotUpActivated( int id )
{
KURL u( m_currentView->locationBarURL() );
KUrl u( m_currentView->locationBarURL() );
kdDebug(1202) << "slotUpActivated. Start URL is " << u << endl;
for ( int i = 0 ; i < m_paUp->popupMenu()->indexOf( id ) + 1 ; i ++ )
u = u.upURL();
@ -3591,7 +3591,7 @@ void KonqMainWindow::slotUpdateFullScreen( bool set )
}
}
void KonqMainWindow::setLocationBarURL( const KURL &url )
void KonqMainWindow::setLocationBarURL( const KUrl &url )
{
setLocationBarURL( url.pathOrURL() );
}
@ -3680,7 +3680,7 @@ void KonqMainWindow::stopAnimation()
m_paStop->setEnabled( false );
}
void KonqMainWindow::setUpEnabled( const KURL &url )
void KonqMainWindow::setUpEnabled( const KUrl &url )
{
//kdDebug(1202) << "KonqMainWindow::setUpEnabled(" << url << ")" << endl;
//kdDebug(1202) << "hasPath=" << url.hasPath() << endl;
@ -3767,8 +3767,8 @@ void KonqMainWindow::initActions()
(void) new KAction( i18n( "Trash" ), "trashcan_full", 0, this, SLOT( slotGoTrash() ), actionCollection(), "go_trash" );
(void) new KAction( i18n( "Autostart" ), 0, this, SLOT( slotGoAutostart() ), actionCollection(), "go_autostart" );
KonqMostOftenURLSAction *mostOften = new KonqMostOftenURLSAction( i18n("Most Often Visited"), actionCollection(), "go_most_often" );
connect( mostOften, SIGNAL( activated( const KURL& )),
SLOT( slotOpenURL( const KURL& )));
connect( mostOften, SIGNAL( activated( const KUrl& )),
SLOT( slotOpenURL( const KUrl& )));
(void) new KAction( i18n( "History" ), "history", 0, this, SLOT( slotGoHistory() ), actionCollection(), "go_history" );
// Settings menu
@ -4025,7 +4025,7 @@ void KonqMainWindow::slotOpenBookmarkURL( const QString & url, Qt::ButtonState s
openFilteredURL( url, req);
else
{
KURL finalURL = KonqMisc::konqFilteredURL( this, url );
KUrl finalURL = KonqMisc::konqFilteredURL( this, url );
KonqMisc::createNewWindow( finalURL.url() );
}
}
@ -4513,12 +4513,12 @@ QString KonqMainWindow::currentTitle() const
return m_currentView ? m_currentView->caption() : QString();
}
void KonqMainWindow::slotPopupMenu( const QPoint &_global, const KURL &url, const QString &_mimeType, mode_t _mode )
void KonqMainWindow::slotPopupMenu( const QPoint &_global, const KUrl &url, const QString &_mimeType, mode_t _mode )
{
slotPopupMenu( 0L, _global, url, _mimeType, _mode );
}
void KonqMainWindow::slotPopupMenu( KXMLGUIClient *client, const QPoint &_global, const KURL &url, const QString &_mimeType, mode_t _mode )
void KonqMainWindow::slotPopupMenu( KXMLGUIClient *client, const QPoint &_global, const KUrl &url, const QString &_mimeType, mode_t _mode )
{
KFileItem item( url, _mimeType, _mode );
KFileItemList items;
@ -4526,7 +4526,7 @@ void KonqMainWindow::slotPopupMenu( KXMLGUIClient *client, const QPoint &_global
slotPopupMenu( client, _global, items, KParts::URLArgs(), KParts::BrowserExtension::DefaultPopupItems, false ); //BE CAREFUL WITH sender() !
}
void KonqMainWindow::slotPopupMenu( KXMLGUIClient *client, const QPoint &_global, const KURL &url, const KParts::URLArgs &_args, KParts::BrowserExtension::PopupFlags f, mode_t _mode )
void KonqMainWindow::slotPopupMenu( KXMLGUIClient *client, const QPoint &_global, const KUrl &url, const KParts::URLArgs &_args, KParts::BrowserExtension::PopupFlags f, mode_t _mode )
{
KFileItem item( url, _args.serviceType, _mode );
KFileItemList items;
@ -4633,7 +4633,7 @@ void KonqMainWindow::slotPopupMenu( KXMLGUIClient *client, const QPoint &_global
// (This is a bit of a hack for the directory tree....)
// ## should use the new currentView->isHierarchicalView() instead?
// Would this be correct for the konqlistview tree view?
KURL viewURL = currentView->isToggleView() ? KURL() : currentView->url();
KUrl viewURL = currentView->isToggleView() ? KURL() : currentView->url();
bool openedForViewURL = false;
//bool dirsSelected = false;
@ -4641,7 +4641,7 @@ void KonqMainWindow::slotPopupMenu( KXMLGUIClient *client, const QPoint &_global
if ( _items.count() == 1 )
{
const KURL firstURL = _items.first()->url();
const KUrl firstURL = _items.first()->url();
if ( !viewURL.isEmpty() )
{
//firstURL.cleanPath();
@ -4651,7 +4651,7 @@ void KonqMainWindow::slotPopupMenu( KXMLGUIClient *client, const QPoint &_global
//dirsSelected = S_ISDIR( _items.first()->mode() );
}
//check if current url is trash
KURL url = viewURL;
KUrl url = viewURL;
url.cleanPath();
bool isIntoTrash = url.protocol() == "trash" || url.url().startsWith( "system:/trash" );
bool doTabHandling = !openedForViewURL && !isIntoTrash && sReading;
@ -4797,7 +4797,7 @@ void KonqMainWindow::slotPopupPasteTo()
{
if ( !m_currentView || m_popupURL.isEmpty() )
return;
m_currentView->callExtensionURLMethod( "pasteTo(const KURL&)", m_popupURL );
m_currentView->callExtensionURLMethod( "pasteTo(const KUrl&)", m_popupURL );
}
void KonqMainWindow::slotReconfigure()
@ -5260,7 +5260,7 @@ void KonqMainWindow::slotLocationLabelActivated()
m_combo->lineEdit()->selectAll();
}
void KonqMainWindow::slotOpenURL( const KURL& url )
void KonqMainWindow::slotOpenURL( const KUrl& url )
{
openURL( 0L, url );
}
@ -5271,7 +5271,7 @@ KAction *a = m_toggleViewGUIClient->action("konq_sidebartng");
return (a && static_cast<KToggleAction*>(a)->isChecked());
}
void KonqMainWindow::slotAddWebSideBar(const KURL& url, const QString& name)
void KonqMainWindow::slotAddWebSideBar(const KUrl& url, const QString& name)
{
if (url.url().isEmpty() && name.isEmpty())
return;
@ -5325,7 +5325,7 @@ void KonqMainWindow::bookmarksIntoCompletion( const KBookmarkGroup& group )
continue;
}
KURL url = bm.url();
KUrl url = bm.url();
if ( !url.isValid() )
continue;

View file

@ -108,7 +108,7 @@ public:
enum ComboAction { ComboClear, ComboAdd, ComboRemove };
enum PageSecurity { NotCrypted, Encrypted, Mixed };
KonqMainWindow( const KURL &initialURL = KURL(), bool openInitialURL = true, const char *name = 0, const QString& xmluiFile="konqueror.rc");
KonqMainWindow( const KUrl &initialURL = KURL(), bool openInitialURL = true, const char *name = 0, const QString& xmluiFile="konqueror.rc");
~KonqMainWindow();
@ -125,7 +125,7 @@ public:
/**
* The main openURL method.
*/
void openURL( KonqView * view, const KURL & url,
void openURL( KonqView * view, const KUrl & url,
const QString &serviceType = QString(),
KonqOpenURLRequest & req = KonqOpenURLRequest::null, bool trustedSource = false );
@ -133,13 +133,13 @@ public:
* Called by openURL when it knows the service type (either directly,
* or using KonqRun)
*/
bool openView( QString serviceType, const KURL &_url, KonqView *childView,
bool openView( QString serviceType, const KUrl &_url, KonqView *childView,
KonqOpenURLRequest & req = KonqOpenURLRequest::null );
void abortLoading();
void openMultiURL( KURL::List url );
void openMultiURL( KUrl::List url );
KonqViewManager *viewManager() const { return m_pViewManager; }
@ -187,7 +187,7 @@ public:
KParts::ReadOnlyPart *currentPart() const;
/** URL of current part, or URLs of selected items for directory views */
KURL::List currentURLs() const;
KUrl::List currentURLs() const;
// Only valid if there are one or two views
KonqView * otherView( KonqView * view ) const;
@ -209,7 +209,7 @@ public:
/**
* Overload for convenience
*/
void setLocationBarURL( const KURL &url );
void setLocationBarURL( const KUrl &url );
/**
* Return URL displayed in the location bar - for KonqViewManager
*/
@ -338,9 +338,9 @@ public Q_SLOTS:
void slotFillContextMenu( const KBookmark &, QMenu * );
void slotOpenBookmarkURL( const QString & url, Qt::ButtonState state );
void slotPopupMenu( const QPoint &_global, const KURL &_url, const QString &_mimeType, mode_t mode );
void slotPopupMenu( KXMLGUIClient *client, const QPoint &_global, const KURL &_url, const QString &_mimeType, mode_t mode );
void slotPopupMenu( KXMLGUIClient *client, const QPoint &_global, const KURL &_url, const KParts::URLArgs &_args, KParts::BrowserExtension::PopupFlags f, mode_t mode );
void slotPopupMenu( const QPoint &_global, const KUrl &_url, const QString &_mimeType, mode_t mode );
void slotPopupMenu( KXMLGUIClient *client, const QPoint &_global, const KUrl &_url, const QString &_mimeType, mode_t mode );
void slotPopupMenu( KXMLGUIClient *client, const QPoint &_global, const KUrl &_url, const KParts::URLArgs &_args, KParts::BrowserExtension::PopupFlags f, mode_t mode );
void slotPopupMenu( const QPoint &_global, const KFileItemList &_items );
void slotPopupMenu( KXMLGUIClient *client, const QPoint &_global, const KFileItemList &_items );
@ -352,12 +352,12 @@ public Q_SLOTS:
/**
* __NEEEEVER__ call this method directly. It relies on sender() (the part)
*/
void slotOpenURLRequest( const KURL &url, const KParts::URLArgs &args );
void slotOpenURLRequest( const KUrl &url, const KParts::URLArgs &args );
void openURL( KonqView *childView, const KURL &url, const KParts::URLArgs &args );
void openURL( KonqView *childView, const KUrl &url, const KParts::URLArgs &args );
void slotCreateNewWindow( const KURL &url, const KParts::URLArgs &args );
void slotCreateNewWindow( const KURL &url, const KParts::URLArgs &args,
void slotCreateNewWindow( const KUrl &url, const KParts::URLArgs &args );
void slotCreateNewWindow( const KUrl &url, const KParts::URLArgs &args,
const KParts::WindowArgs &windowArgs, KParts::ReadOnlyPart *&part );
void slotNewWindow();
@ -503,7 +503,7 @@ protected Q_SLOTS:
void slotShowMenuBar();
void slotOpenURL( const KURL& );
void slotOpenURL( const KUrl& );
void slotActionStatusText( const QString &text );
void slotClearStatusText();
@ -518,7 +518,7 @@ protected Q_SLOTS:
void slotMoveTabLeft();
void slotMoveTabRight();
void slotAddWebSideBar(const KURL& url, const QString& name);
void slotAddWebSideBar(const KUrl& url, const QString& name);
void slotUpdateFullScreen( bool set ); // do not call directly
@ -527,7 +527,7 @@ protected:
void fillHistoryPopup( QMenu *menu, const Q3PtrList<HistoryEntry> &history );
bool makeViewsFollow( const KURL & url, const KParts::URLArgs &args, const QString & serviceType,
bool makeViewsFollow( const KUrl & url, const KParts::URLArgs &args, const QString & serviceType,
KonqView * senderView );
void applyKonqMainWindowSettings();
@ -541,7 +541,7 @@ protected:
virtual void closeEvent( QCloseEvent * );
virtual bool queryExit();
bool askForTarget(const QString& text, KURL& url);
bool askForTarget(const QString& text, KUrl& url);
private Q_SLOTS:
void slotRequesterClicked( KUrlRequester * );
@ -560,7 +560,7 @@ private Q_SLOTS:
void showPageSecurity();
private:
QString detectNameFilter( KURL & url );
QString detectNameFilter( KUrl & url );
/**
* takes care of hiding the bookmarkbar and calling setChecked( false ) on the
@ -584,7 +584,7 @@ private:
void startAnimation();
void stopAnimation();
void setUpEnabled( const KURL &url );
void setUpEnabled( const KUrl &url );
void initCombo();
void initActions();
@ -736,7 +736,7 @@ private:
KTrader::OfferList m_popupEmbeddingServices;
QString m_popupService;
QString m_popupServiceType;
KURL m_popupURL;
KUrl m_popupURL;
QString m_initialFrameName;

View file

@ -68,12 +68,12 @@ void KonqMisc::abortFullScreenMode()
}
// #### this can probably be removed
KonqMainWindow * KonqMisc::createSimpleWindow( const KURL & _url, const QString &frameName )
KonqMainWindow * KonqMisc::createSimpleWindow( const KUrl & _url, const QString &frameName )
{
abortFullScreenMode();
// If _url is 0L, open $HOME [this doesn't happen anymore]
KURL url;
KUrl url;
if (_url.isEmpty())
url.setPath(QDir::homePath());
else
@ -87,7 +87,7 @@ KonqMainWindow * KonqMisc::createSimpleWindow( const KURL & _url, const QString
return win;
}
KonqMainWindow * KonqMisc::createSimpleWindow( const KURL & url, const KParts::URLArgs &args, bool tempFile )
KonqMainWindow * KonqMisc::createSimpleWindow( const KUrl & url, const KParts::URLArgs &args, bool tempFile )
{
abortFullScreenMode();
@ -101,7 +101,7 @@ KonqMainWindow * KonqMisc::createSimpleWindow( const KURL & url, const KParts::U
return win;
}
KonqMainWindow * KonqMisc::createNewWindow( const KURL &url, const KParts::URLArgs &args, bool forbidUseHTML, QStringList filesToSelect, bool tempFile, bool openURL )
KonqMainWindow * KonqMisc::createNewWindow( const KUrl &url, const KParts::URLArgs &args, bool forbidUseHTML, QStringList filesToSelect, bool tempFile, bool openURL )
{
kdDebug() << "KonqMisc::createNewWindow url=" << url << endl;
@ -116,7 +116,7 @@ KonqMainWindow * KonqMisc::createNewWindow( const KURL &url, const KParts::URLAr
forbidUseHTML, filesToSelect, tempFile, openURL );
}
KonqMainWindow * KonqMisc::createBrowserWindowFromProfile( const QString &path, const QString &filename, const KURL &url, const KParts::URLArgs &args, bool forbidUseHTML, const QStringList& filesToSelect, bool tempFile, bool openURL )
KonqMainWindow * KonqMisc::createBrowserWindowFromProfile( const QString &path, const QString &filename, const KUrl &url, const KParts::URLArgs &args, bool forbidUseHTML, const QStringList& filesToSelect, bool tempFile, bool openURL )
{
kdDebug(1202) << "void KonqMisc::createBrowserWindowFromProfile() " << endl;
kdDebug(1202) << "path=" << path << ",filename=" << filename << ",url=" << url.prettyURL() << endl;
@ -216,7 +216,7 @@ QString KonqMisc::konqFilteredURL( QWidget* parent, const QString& _url, const Q
}
}
else if ( _url.startsWith( "about:" ) && _url != "about:blank" ) {
// We can't use "about:" as it is, KURL doesn't parse it.
// We can't use "about:" as it is, KUrl doesn't parse it.
if (_url == "about:plugins")
return "about:plugins";
return "about:konqueror";
@ -249,7 +249,7 @@ void KonqDraggableLabel::mouseMoveEvent( QMouseEvent * ev )
validDrag = false;
if ( m_mw->currentView() )
{
KURL::List lst;
KUrl::List lst;
lst.append( m_mw->currentView()->url() );
Q3DragObject * drag = new K3URLDrag( lst, m_mw );
drag->setPixmap( KMimeType::pixmapForURL( lst.first(), 0, KIcon::Small ) );

View file

@ -58,12 +58,12 @@ public:
/**
* Create a new window with a single view, showing @p url
*/
static KonqMainWindow * createSimpleWindow( const KURL &url, const QString &frameName = QString() );
static KonqMainWindow * createSimpleWindow( const KUrl &url, const QString &frameName = QString() );
/**
* Create a new window with a single view, showing @p url, using @p args
*/
static KonqMainWindow * createSimpleWindow( const KURL &url, const KParts::URLArgs &args,
static KonqMainWindow * createSimpleWindow( const KUrl &url, const KParts::URLArgs &args,
bool tempFile = false);
/**
@ -71,7 +71,7 @@ public:
* @param forbidUseHTML internal. True when called by "Find Files"
* @param openURL If it is false, no url is openend in the new window. The url is used to guess the profile
*/
static KonqMainWindow * createNewWindow( const KURL &url,
static KonqMainWindow * createNewWindow( const KUrl &url,
const KParts::URLArgs &args = KParts::URLArgs(),
bool forbidUseHTML = false,
QStringList filesToSelect = QStringList(),
@ -86,7 +86,7 @@ public:
*/
static KonqMainWindow * createBrowserWindowFromProfile( const QString &path,
const QString &filename,
const KURL &url = KURL(),
const KUrl &url = KURL(),
const KParts::URLArgs &args = KParts::URLArgs(),
bool forbidUseHTML = false,
const QStringList& filesToSelect = QStringList(),
@ -133,7 +133,7 @@ private:
QPoint startDragPos;
bool validDrag;
KonqMainWindow * m_mw;
KURL::List _savedLst;
KUrl::List _savedLst;
};
#endif

View file

@ -32,7 +32,7 @@
#define HINT_UTF8 106
KonqRun::KonqRun( KonqMainWindow* mainWindow, KonqView *_childView,
const KURL & _url, const KonqOpenURLRequest & req, bool trustedSource )
const KUrl & _url, const KonqOpenURLRequest & req, bool trustedSource )
: KParts::BrowserRun( _url, req.args, _childView ? _childView->part() : 0L, mainWindow,
//remove referrer if request was typed in manually.
// ### TODO: turn this off optionally.
@ -161,8 +161,8 @@ void KonqRun::scanFile()
// BrowserRun changes
KIO::TransferJob *job = dynamic_cast<KIO::TransferJob*>( m_job );
if ( job && !job->error() ) {
connect( job, SIGNAL( redirection( KIO::Job *, const KURL& )),
SLOT( slotRedirection( KIO::Job *, const KURL& ) ));
connect( job, SIGNAL( redirection( KIO::Job *, const KUrl& )),
SLOT( slotRedirection( KIO::Job *, const KUrl& ) ));
if ( m_pView && m_pView->service()->desktopEntryName() != "konq_sidebartng") {
connect( job, SIGNAL( infoMessage( KIO::Job*, const QString& ) ),
m_pView, SLOT( slotInfoMessage(KIO::Job*, const QString& ) ) );
@ -170,9 +170,9 @@ void KonqRun::scanFile()
}
}
void KonqRun::slotRedirection( KIO::Job *job, const KURL& redirectedToURL )
void KonqRun::slotRedirection( KIO::Job *job, const KUrl& redirectedToURL )
{
KURL redirectFromURL = static_cast<KIO::TransferJob *>(job)->url();
KUrl redirectFromURL = static_cast<KIO::TransferJob *>(job)->url();
kdDebug(1202) << "KonqRun::slotRedirection from " <<
redirectFromURL.prettyURL() << " to " << redirectedToURL.prettyURL() << endl;
KonqHistoryManager::kself()->confirmPending( redirectFromURL );

View file

@ -37,7 +37,7 @@ public:
* optionnal child view.
*/
KonqRun( KonqMainWindow* mainWindow, KonqView *childView,
const KURL &url, const KonqOpenURLRequest & req = KonqOpenURLRequest(),
const KUrl &url, const KonqOpenURLRequest & req = KonqOpenURLRequest(),
bool trustedSource = false );
virtual ~KonqRun();
@ -51,7 +51,7 @@ public:
const QString & typedURL() const { return m_req.typedURL; }
KURL mailtoURL() const { return m_mailto; }
KUrl mailtoURL() const { return m_mailto; }
protected:
virtual void foundMimeType( const QString & _type );
@ -60,14 +60,14 @@ protected:
virtual void scanFile();
protected Q_SLOTS:
void slotRedirection( KIO::Job *, const KURL& );
void slotRedirection( KIO::Job *, const KUrl& );
protected:
QPointer<KonqMainWindow> m_pMainWindow;
QPointer<KonqView> m_pView;
bool m_bFoundMimeType;
KonqOpenURLRequest m_req;
KURL m_mailto;
KUrl m_mailto;
};
#endif

View file

@ -443,7 +443,7 @@ void KonqFrameTabs::slotSubPopupMenuTabActivated( int _id)
void KonqFrameTabs::slotMouseMiddleClick()
{
KURL filteredURL ( KonqMisc::konqFilteredURL( this, QApplication::clipboard()->text(QClipboard::Selection) ) );
KUrl filteredURL ( KonqMisc::konqFilteredURL( this, QApplication::clipboard()->text(QClipboard::Selection) ) );
if ( !filteredURL.isEmpty() ) {
KonqView* newView = m_pViewManager->addTab(QString(), QString(), false, false);
if (newView == 0L) return;
@ -463,7 +463,7 @@ void KonqFrameTabs::slotMouseMiddleClick( QWidget *w )
}
}
else {
KURL filteredURL ( KonqMisc::konqFilteredURL( this, QApplication::clipboard()->text(QClipboard::Selection ) ) );
KUrl filteredURL ( KonqMisc::konqFilteredURL( this, QApplication::clipboard()->text(QClipboard::Selection ) ) );
if ( !filteredURL.isEmpty() ) {
KonqFrameBase* frame = dynamic_cast<KonqFrameBase*>(w);
if (frame) {
@ -475,12 +475,12 @@ void KonqFrameTabs::slotMouseMiddleClick( QWidget *w )
void KonqFrameTabs::slotTestCanDecode(const QDragMoveEvent *e, bool &accept /* result */)
{
accept = KURL::List::canDecode( e->mimeData() );
accept = KUrl::List::canDecode( e->mimeData() );
}
void KonqFrameTabs::slotReceivedDropEvent( QDropEvent *e )
{
KURL::List lstDragURLs = KURL::List::fromMimeData( e->mimeData() );
KUrl::List lstDragURLs = KUrl::List::fromMimeData( e->mimeData() );
if ( lstDragURLs.count() ) {
KonqView* newView = m_pViewManager->addTab(QString(), QString(), false, false);
if (newView == 0L) return;
@ -492,10 +492,10 @@ void KonqFrameTabs::slotReceivedDropEvent( QDropEvent *e )
void KonqFrameTabs::slotReceivedDropEvent( QWidget *w, QDropEvent *e )
{
KURL::List lstDragURLs = KURL::List::fromMimeData( e->mimeData() );
KUrl::List lstDragURLs = KUrl::List::fromMimeData( e->mimeData() );
KonqFrameBase* frame = dynamic_cast<KonqFrameBase*>(w);
if ( lstDragURLs.count() && frame ) {
KURL lstDragURL = lstDragURLs.first();
KUrl lstDragURL = lstDragURLs.first();
if ( lstDragURL != frame->activeChildView()->url() )
m_pViewManager->mainWindow()->openURL( frame->activeChildView(), lstDragURL );
}

View file

@ -144,7 +144,7 @@ KonqView::~KonqView()
//kdDebug(1202) << "KonqView::~KonqView " << this << " done" << endl;
}
void KonqView::openURL( const KURL &url, const QString & locationBarURL,
void KonqView::openURL( const KUrl &url, const QString & locationBarURL,
const QString & nameFilter, bool tempFile )
{
kdDebug(1202) << "KonqView::openURL url=" << url << " locationBarURL=" << locationBarURL << endl;
@ -397,8 +397,8 @@ void KonqView::connectPart( )
{
ext->setBrowserInterface( m_browserIface );
connect( ext, SIGNAL( openURLRequestDelayed( const KURL &, const KParts::URLArgs &) ),
m_pMainWindow, SLOT( slotOpenURLRequest( const KURL &, const KParts::URLArgs & ) ) );
connect( ext, SIGNAL( openURLRequestDelayed( const KUrl &, const KParts::URLArgs &) ),
m_pMainWindow, SLOT( slotOpenURLRequest( const KUrl &, const KParts::URLArgs & ) ) );
if ( m_bPopupMenuEnabled )
{
@ -409,17 +409,17 @@ void KonqView::connectPart( )
connect( ext, SIGNAL( setLocationBarURL( const QString & ) ),
this, SLOT( setLocationBarURL( const QString & ) ) );
connect( ext, SIGNAL( setIconURL( const KURL & ) ),
this, SLOT( setIconURL( const KURL & ) ) );
connect( ext, SIGNAL( setIconURL( const KUrl & ) ),
this, SLOT( setIconURL( const KUrl & ) ) );
connect( ext, SIGNAL( setPageSecurity( int ) ),
this, SLOT( setPageSecurity( int ) ) );
connect( ext, SIGNAL( createNewWindow( const KURL &, const KParts::URLArgs & ) ),
m_pMainWindow, SLOT( slotCreateNewWindow( const KURL &, const KParts::URLArgs & ) ) );
connect( ext, SIGNAL( createNewWindow( const KUrl &, const KParts::URLArgs & ) ),
m_pMainWindow, SLOT( slotCreateNewWindow( const KUrl &, const KParts::URLArgs & ) ) );
connect( ext, SIGNAL( createNewWindow( const KURL &, const KParts::URLArgs &, const KParts::WindowArgs &, KParts::ReadOnlyPart *& ) ),
m_pMainWindow, SLOT( slotCreateNewWindow( const KURL &, const KParts::URLArgs &, const KParts::WindowArgs &, KParts::ReadOnlyPart *& ) ) );
connect( ext, SIGNAL( createNewWindow( const KUrl &, const KParts::URLArgs &, const KParts::WindowArgs &, KParts::ReadOnlyPart *& ) ),
m_pMainWindow, SLOT( slotCreateNewWindow( const KUrl &, const KParts::URLArgs &, const KParts::WindowArgs &, KParts::ReadOnlyPart *& ) ) );
connect( ext, SIGNAL( loadingProgress( int ) ),
m_pKonqFrame->statusbar(), SLOT( slotLoadingProgress( int ) ) );
@ -456,9 +456,9 @@ void KonqView::connectPart( )
m_pKonqFrame->statusbar(), SLOT( message( const QString & ) ) );
connect( ext,
SIGNAL( addWebSideBar(const KURL&, const QString&) ),
SIGNAL( addWebSideBar(const KUrl&, const QString&) ),
m_pMainWindow,
SLOT( slotAddWebSideBar(const KURL&, const QString&) ) );
SLOT( slotAddWebSideBar(const KUrl&, const QString&) ) );
}
callExtensionBoolMethod( "setSaveViewPropertiesLocally(bool)", m_pMainWindow->saveViewPropertiesLocally() );
@ -636,7 +636,7 @@ void KonqView::slotMouseOverInfo( const KFileItem *item )
QApplication::sendEvent( m_pMainWindow, &ev );
}
void KonqView::setLocationBarURL( const KURL& locationBarURL )
void KonqView::setLocationBarURL( const KUrl& locationBarURL )
{
setLocationBarURL( locationBarURL.pathOrURL() );
}
@ -655,7 +655,7 @@ void KonqView::setLocationBarURL( const QString & locationBarURL )
if (!m_bPassiveMode) setTabIcon( m_sLocationBarURL );
}
void KonqView::setIconURL( const KURL & iconURL )
void KonqView::setIconURL( const KUrl & iconURL )
// This function sets the favIcon in konqui's window if enabled,
// thus it is responsible for the icon in the taskbar.
// It does not set the tab's favIcon.
@ -689,7 +689,7 @@ void KonqView::setCaption( const QString & caption )
if (url().isLocalFile())
{
// Is the caption a URL? If so, is it local? If so, only display the filename!
KURL url(caption);
KUrl url(caption);
if (url.isValid() && url.isLocalFile() && url.fileName() == this->url().fileName())
adjustedCaption = url.fileName();
}
@ -897,19 +897,19 @@ void KonqView::copyHistory( KonqView *other )
m_lstHistory.at(other->m_lstHistory.at());
}
KURL KonqView::url() const
KUrl KonqView::url() const
{
assert( m_pPart );
return m_pPart->url();
}
KURL KonqView::upURL() const
KUrl KonqView::upURL() const
{
KURL currentURL;
KUrl currentURL;
if ( m_pRun )
currentURL = m_pRun->url();
else
currentURL = KURL::fromPathOrURL( m_sLocationBarURL );
currentURL = KUrl::fromPathOrURL( m_sLocationBarURL );
return currentURL.upURL();
}
@ -1012,7 +1012,7 @@ void KonqView::setLockedLocation( bool b )
m_bLockedLocation = b;
}
void KonqView::aboutToOpenURL( const KURL &url, const KParts::URLArgs &args )
void KonqView::aboutToOpenURL( const KUrl &url, const KParts::URLArgs &args )
{
KParts::OpenURLEvent ev( m_pPart, url, args );
QApplication::sendEvent( m_pMainWindow, &ev );
@ -1122,7 +1122,7 @@ bool KonqView::callExtensionStringMethod( const char *methodName, QString value
return true;
}
bool KonqView::callExtensionURLMethod( const char *methodName, const KURL& value )
bool KonqView::callExtensionURLMethod( const char *methodName, const KUrl& value )
{
QObject *obj = KParts::BrowserExtension::childObject( m_pPart );
if ( !obj ) // not all views have a browser extension !
@ -1168,8 +1168,8 @@ void KonqView::enablePopupMenu( bool b )
connect( ext, SIGNAL( popupMenu( const QPoint &, const KFileItemList & ) ),
m_pMainWindow, SLOT( slotPopupMenu( const QPoint &, const KFileItemList & ) ) );
connect( ext, SIGNAL( popupMenu( const QPoint &, const KURL &, const QString &, mode_t ) ),
m_pMainWindow, SLOT( slotPopupMenu( const QPoint &, const KURL &, const QString &, mode_t ) ) );
connect( ext, SIGNAL( popupMenu( const QPoint &, const KUrl &, const QString &, mode_t ) ),
m_pMainWindow, SLOT( slotPopupMenu( const QPoint &, const KUrl &, const QString &, mode_t ) ) );
connect( ext, SIGNAL( popupMenu( KXMLGUIClient *, const QPoint &, const KFileItemList & ) ),
m_pMainWindow, SLOT( slotPopupMenu( KXMLGUIClient *, const QPoint &, const KFileItemList & ) ) );
@ -1177,11 +1177,11 @@ void KonqView::enablePopupMenu( bool b )
connect( ext, SIGNAL( popupMenu( KXMLGUIClient *, const QPoint &, const KFileItemList &, const KParts::URLArgs &, KParts::BrowserExtension::PopupFlags ) ),
m_pMainWindow, SLOT( slotPopupMenu( KXMLGUIClient *, const QPoint &, const KFileItemList &, const KParts::URLArgs &, KParts::BrowserExtension::PopupFlags ) ) );
connect( ext, SIGNAL( popupMenu( KXMLGUIClient *, const QPoint &, const KURL &, const QString &, mode_t ) ),
m_pMainWindow, SLOT( slotPopupMenu( KXMLGUIClient *, const QPoint &, const KURL &, const QString &, mode_t ) ) );
connect( ext, SIGNAL( popupMenu( KXMLGUIClient *, const QPoint &, const KUrl &, const QString &, mode_t ) ),
m_pMainWindow, SLOT( slotPopupMenu( KXMLGUIClient *, const QPoint &, const KUrl &, const QString &, mode_t ) ) );
connect( ext, SIGNAL( popupMenu( KXMLGUIClient *, const QPoint &, const KURL &, const KParts::URLArgs &, KParts::BrowserExtension::PopupFlags, mode_t ) ),
m_pMainWindow, SLOT( slotPopupMenu( KXMLGUIClient *, const QPoint &, const KURL &, const KParts::URLArgs &, KParts::BrowserExtension::PopupFlags, mode_t ) ) );
connect( ext, SIGNAL( popupMenu( KXMLGUIClient *, const QPoint &, const KUrl &, const KParts::URLArgs &, KParts::BrowserExtension::PopupFlags, mode_t ) ),
m_pMainWindow, SLOT( slotPopupMenu( KXMLGUIClient *, const QPoint &, const KUrl &, const KParts::URLArgs &, KParts::BrowserExtension::PopupFlags, mode_t ) ) );
}
else // disable context popup
{
@ -1190,14 +1190,14 @@ void KonqView::enablePopupMenu( bool b )
disconnect( ext, SIGNAL( popupMenu( const QPoint &, const KFileItemList & ) ),
m_pMainWindow, SLOT( slotPopupMenu( const QPoint &, const KFileItemList & ) ) );
disconnect( ext, SIGNAL( popupMenu( const QPoint &, const KURL &, const QString &, mode_t ) ),
m_pMainWindow, SLOT( slotPopupMenu( const QPoint &, const KURL &, const QString &, mode_t ) ) );
disconnect( ext, SIGNAL( popupMenu( const QPoint &, const KUrl &, const QString &, mode_t ) ),
m_pMainWindow, SLOT( slotPopupMenu( const QPoint &, const KUrl &, const QString &, mode_t ) ) );
disconnect( ext, SIGNAL( popupMenu( KXMLGUIClient *, const QPoint &, const KFileItemList & ) ),
m_pMainWindow, SLOT( slotPopupMenu( KXMLGUIClient *, const QPoint &, const KFileItemList & ) ) );
disconnect( ext, SIGNAL( popupMenu( KXMLGUIClient *, const QPoint &, const KURL &, const QString &, mode_t ) ),
m_pMainWindow, SLOT( slotPopupMenu( KXMLGUIClient *, const QPoint &, const KURL &, const QString &, mode_t ) ) );
disconnect( ext, SIGNAL( popupMenu( KXMLGUIClient *, const QPoint &, const KUrl &, const QString &, mode_t ) ),
m_pMainWindow, SLOT( slotPopupMenu( KXMLGUIClient *, const QPoint &, const KUrl &, const QString &, mode_t ) ) );
}
enableBackRightClick( m_bBackRightClick );
}
@ -1252,7 +1252,7 @@ bool KonqView::eventFilter( QObject *obj, QEvent *e )
if ( K3URLDrag::canDecode( ev ) )
{
KURL::List lstDragURLs;
KUrl::List lstDragURLs;
bool ok = K3URLDrag::decode( ev, lstDragURLs );
QObjectList children = m_pPart->widget()->queryList( "QWidget" );
@ -1268,7 +1268,7 @@ bool KonqView::eventFilter( QObject *obj, QEvent *e )
{
QDropEvent *ev = static_cast<QDropEvent *>( e );
KURL::List lstDragURLs;
KUrl::List lstDragURLs;
bool ok = K3URLDrag::decode( ev, lstDragURLs );
KParts::BrowserExtension *ext = browserExtension();

View file

@ -46,7 +46,7 @@ namespace KParts
struct HistoryEntry
{
KURL url;
KUrl url;
QString locationBarURL; // can be different from url when showing a index.html
QString title;
QByteArray buffer;
@ -99,7 +99,7 @@ public:
* @param nameFilter e.g. *.cpp
* @param tempFile whether to delete the file after use
*/
void openURL( const KURL &url,
void openURL( const KUrl &url,
const QString & locationBarURL,
const QString &nameFilter = QString(),
bool tempFile = false );
@ -184,9 +184,9 @@ public:
/**
* Retrieve view's URL
*/
KURL url() const;
KUrl url() const;
KURL upURL() const;
KUrl upURL() const;
/**
* Get view's location bar URL, i.e. the one that the view signals
@ -292,7 +292,7 @@ public:
bool callExtensionMethod( const char *methodName );
bool callExtensionBoolMethod( const char *methodName, bool value );
bool callExtensionStringMethod( const char *methodName, QString value );
bool callExtensionURLMethod( const char *methodName, const KURL& value );
bool callExtensionURLMethod( const char *methodName, const KUrl& value );
void setViewName( const QString &name );
QString viewName() const;
@ -319,7 +319,7 @@ public:
bool prepareReload( KParts::URLArgs& args );
// overload for the QString version
void setLocationBarURL( const KURL& locationBarURL );
void setLocationBarURL( const KUrl& locationBarURL );
static QStringList childFrameNames( KParts::ReadOnlyPart *part );
@ -352,7 +352,7 @@ public Q_SLOTS:
/**
* get an icon for the URL from the BrowserExtension
*/
void setIconURL( const KURL &iconURL );
void setIconURL( const KUrl &iconURL );
void setTabIcon( const QString &url );
@ -410,7 +410,7 @@ private:
*/
void updateHistoryEntry(bool saveLocationBarURL);
void aboutToOpenURL( const KURL &url, const KParts::URLArgs &args = KParts::URLArgs() );
void aboutToOpenURL( const KUrl &url, const KParts::URLArgs &args = KParts::URLArgs() );
void setServiceTypeInExtension();

View file

@ -213,7 +213,7 @@ KonqView* KonqViewManager::splitWindow( Qt::Orientation orientation,
if (!m_pMainWindow || !m_pMainWindow->currentView())
return 0L;
KURL url = m_pMainWindow->currentView()->url();
KUrl url = m_pMainWindow->currentView()->url();
QString locationBarURL = m_pMainWindow->currentView()->locationBarURL();
KService::Ptr service;
@ -1123,7 +1123,7 @@ void KonqViewManager::saveViewProfile( KConfig & cfg, bool saveURLs, bool saveWi
}
void KonqViewManager::loadViewProfile( const QString & path, const QString & filename,
const KURL & forcedURL, const KonqOpenURLRequest &req,
const KUrl & forcedURL, const KonqOpenURLRequest &req,
bool resetWindow, bool openURL )
{
KConfig cfg( path, true );
@ -1133,7 +1133,7 @@ void KonqViewManager::loadViewProfile( const QString & path, const QString & fil
}
void KonqViewManager::loadViewProfile( KConfig &cfg, const QString & filename,
const KURL & forcedURL, const KonqOpenURLRequest &req,
const KUrl & forcedURL, const KonqOpenURLRequest &req,
bool resetWindow, bool openURL )
{
if ( docContainer() && docContainer()->frameType()=="Tabs" )
@ -1192,7 +1192,7 @@ void KonqViewManager::loadViewProfile( KConfig &cfg, const QString & filename,
m_profileHomeURL = cfg.readEntry("HomeURL", QString());
m_pMainWindow->currentProfileChanged();
KURL defaultURL;
KUrl defaultURL;
if ( m_pMainWindow->currentView() )
defaultURL = m_pMainWindow->currentView()->url();
@ -1443,7 +1443,7 @@ QSize KonqViewManager::readConfigSize( KConfig &cfg, QWidget *widget )
}
void KonqViewManager::loadItem( KConfig &cfg, KonqFrameContainerBase *parent,
const QString &name, const KURL & defaultURL, bool openURL, bool openAfterCurrentPage )
const QString &name, const KUrl & defaultURL, bool openURL, bool openAfterCurrentPage )
{
QString prefix;
if( name != "InitialView" )
@ -1535,7 +1535,7 @@ void KonqViewManager::loadItem( KConfig &cfg, KonqFrameContainerBase *parent,
QString key = QString::fromLatin1( "URL" ).prepend( prefix );
if ( openURL )
{
KURL url;
KUrl url;
if ( cfg.hasKey( key ) )
{
@ -1706,7 +1706,7 @@ void KonqViewManager::slotProfileActivated( int id )
for(int i=0; iter != end; ++iter, ++i) {
if( i == id ) {
KURL u;
KUrl u;
u.setPath( *iter );
loadViewProfile( *iter, u.fileName() );
break;

View file

@ -201,7 +201,7 @@ public:
* settings, they will be reset to the defaults
*/
void loadViewProfile( KConfig &cfg, const QString & filename,
const KURL & forcedURL = KURL(),
const KUrl & forcedURL = KURL(),
const KonqOpenURLRequest &req = KonqOpenURLRequest(),
bool resetWindow = false, bool openURL = true );
@ -216,7 +216,7 @@ public:
* settings, they will be reset to the defaults
*/
void loadViewProfile( const QString & path, const QString & filename,
const KURL & forcedURL = KURL(),
const KUrl & forcedURL = KURL(),
const KonqOpenURLRequest &req = KonqOpenURLRequest(),
bool resetWindow = false, bool openURL = true );
/**
@ -309,7 +309,7 @@ protected:
* (this is set to false when we have a forcedURL to open)
*/
void loadItem( KConfig &cfg, KonqFrameContainerBase *parent,
const QString &name, const KURL & defaultURL, bool openURL, bool openAfterCurrentPage = false );
const QString &name, const KUrl & defaultURL, bool openURL, bool openAfterCurrentPage = false );
// Disabled - we do it ourselves
virtual void setActiveInstance( KInstance * ) {}

View file

@ -135,7 +135,7 @@ void KonqInfoListViewWidget::createFavoriteColumns()
}
bool KonqInfoListViewWidget::openURL( const KURL &url )
bool KonqInfoListViewWidget::openURL( const KUrl &url )
{
bool ret = KonqBaseListViewWidget::openURL(url);
m_bTopLevelComplete = true;

View file

@ -42,7 +42,7 @@ class KonqInfoListViewWidget : public KonqBaseListViewWidget
const QStringList columnKeys() {return m_columnKeys;}
virtual bool openURL( const KURL &url );
virtual bool openURL( const KUrl &url );
protected Q_SLOTS:
// slots connected to the directory lister

View file

@ -129,7 +129,7 @@ void ListViewBrowserExtension::updateActions()
{
KFileItem* item = *kit;
canCopy++;
KURL url = item->url();
KUrl url = item->url();
#warning hardcoded protocol: find a better way to determine if a url is a trash url.
if ( url.protocol() == "trash" )
bInTrash = true;
@ -161,7 +161,7 @@ void ListViewBrowserExtension::paste()
KonqOperations::doPaste( m_listView->listViewWidget(), m_listView->url() );
}
void ListViewBrowserExtension::pasteTo( const KURL& url )
void ListViewBrowserExtension::pasteTo( const KUrl& url )
{
KonqOperations::doPaste( m_listView->listViewWidget(), url );
}
@ -318,9 +318,9 @@ void KonqListView::guiActivateEvent( KParts::GUIActivateEvent *event )
((ListViewBrowserExtension*)m_extension)->updateActions();
}
bool KonqListView::doOpenURL( const KURL &url )
bool KonqListView::doOpenURL( const KUrl &url )
{
KURL u( url );
KUrl u( url );
const QString prettyURL = url.pathOrURL();
emit setWindowCaption( prettyURL );
return m_pListView->openURL( url );
@ -367,7 +367,7 @@ void KonqListView::restoreState( QDataStream &stream )
m_pListView->restoreState( stream );
}
void KonqListView::disableIcons( const KURL::List &lst )
void KonqListView::disableIcons( const KUrl::List &lst )
{
m_pListView->disableIcons( lst );
}

View file

@ -79,7 +79,7 @@ public:
virtual void restoreState( QDataStream &stream );
// "Cut" icons : disable those whose URL is in lst, enable the others
virtual void disableIcons( const KURL::List & lst );
virtual void disableIcons( const KUrl::List & lst );
// See KMimeTypeResolver
void mimeTypeDeterminationFinished() {}
@ -92,7 +92,7 @@ public:
virtual void newIconSize( int );
protected:
virtual bool doOpenURL( const KURL &url );
virtual bool doOpenURL( const KUrl &url );
virtual bool doCloseURL();
virtual bool openFile() { return true; }
@ -135,7 +135,7 @@ protected Q_SLOTS:
virtual void slotDeleteItem( KFileItem * item ) { m_pListView->slotDeleteItem( item ); }
virtual void slotRefreshItems( const KFileItemList& lst ) { m_pListView->slotRefreshItems( lst ); }
virtual void slotClear() { m_pListView->slotClear(); }
virtual void slotRedirection( const KURL & u ) { m_pListView->slotRedirection( u ); }
virtual void slotRedirection( const KUrl & u ) { m_pListView->slotRedirection( u ); }
// Connected to KonqDirPart
void slotKFindOpened();
@ -186,7 +186,7 @@ class ListViewBrowserExtension : public KonqDirPartBrowserExtension
void copy() { copySelection( false ); }
void cut() { copySelection( true ); }
void paste();
void pasteTo( const KURL & );
void pasteTo( const KUrl & );
void rename();
void trash();
void del() { KonqOperations::del(m_listView->listViewWidget(),

View file

@ -143,7 +143,7 @@ KonqBaseListViewWidget::KonqBaseListViewWidget( KonqListView *parent, QWidget *p
this, SIGNAL(viewportAdjusted()) );
// Connect the directory lister
connect( m_dirLister, SIGNAL(started( const KURL & )),
connect( m_dirLister, SIGNAL(started( const KUrl & )),
this, SLOT(slotStarted()) );
connect( m_dirLister, SIGNAL(completed()), this, SLOT(slotCompleted()) );
connect( m_dirLister, SIGNAL(canceled()), this, SLOT(slotCanceled()) );
@ -154,8 +154,8 @@ KonqBaseListViewWidget::KonqBaseListViewWidget( KonqListView *parent, QWidget *p
this, SLOT(slotDeleteItem( KFileItem * )) );
connect( m_dirLister, SIGNAL(refreshItems( const KFileItemList & )),
this, SLOT( slotRefreshItems( const KFileItemList & )) );
connect( m_dirLister, SIGNAL(redirection( const KURL & )),
this, SLOT(slotRedirection( const KURL & )) );
connect( m_dirLister, SIGNAL(redirection( const KUrl & )),
this, SLOT(slotRedirection( const KUrl & )) );
connect( m_dirLister, SIGNAL(itemsFilteredByMime( const KFileItemList & )),
m_pBrowserView, SIGNAL(itemsFilteredByMime( const KFileItemList & )) );
@ -191,7 +191,7 @@ KonqBaseListViewWidget::~KonqBaseListViewWidget()
delete m_fileTip;
}
void KonqBaseListViewWidget::readProtocolConfig( const KURL & url )
void KonqBaseListViewWidget::readProtocolConfig( const KUrl & url )
{
const QString protocol = url.protocol();
KonqListViewSettings config( protocol );
@ -372,7 +372,7 @@ void KonqBaseListViewWidget::stop()
m_dirLister->stop();
}
const KURL & KonqBaseListViewWidget::url()
const KUrl & KonqBaseListViewWidget::url()
{
return m_url;
}
@ -744,7 +744,7 @@ void KonqBaseListViewWidget::viewportDropEvent( QDropEvent *ev )
isExecuteArea( ev->pos() ) ? (KonqBaseListViewItem*)itemAt( ev->pos() ) : 0;
KFileItem * destItem = (item) ? item->item() : m_dirLister->rootItem();
KURL u = destItem ? destItem->url() : url();
KUrl u = destItem ? destItem->url() : url();
if ( u.isEmpty() )
return;
KonqOperations::doDrop( destItem /*may be 0L*/, u, ev, this );
@ -753,7 +753,7 @@ void KonqBaseListViewWidget::viewportDropEvent( QDropEvent *ev )
void KonqBaseListViewWidget::startDrag()
{
m_fileTip->setItem( 0 );
KURL::List urls = selectedUrls( false );
KUrl::List urls = selectedUrls( false );
Q3ListViewItem * m_pressedItem = currentItem();
@ -877,10 +877,10 @@ KFileItemList KonqBaseListViewWidget::selectedFileItems()
return list;
}
KURL::List KonqBaseListViewWidget::selectedUrls( bool mostLocal )
KUrl::List KonqBaseListViewWidget::selectedUrls( bool mostLocal )
{
bool dummy;
KURL::List list;
KUrl::List list;
iterator it = begin();
for ( ; it != end(); it++ )
if ( it->isSelected() )
@ -901,7 +901,7 @@ void KonqBaseListViewWidget::slotReturnPressed( Q3ListViewItem *_item )
if ( !fileItem )
return;
KURL url = fileItem->url();
KUrl url = fileItem->url();
url.cleanPath();
#warning hardcoded protocol: find a better way to determine if a url is a trash url.
bool isIntoTrash = url.protocol() == "trash";
@ -969,7 +969,7 @@ void KonqBaseListViewWidget::updateListContents()
it->updateContents();
}
bool KonqBaseListViewWidget::openURL( const KURL &url )
bool KonqBaseListViewWidget::openURL( const KUrl &url )
{
kdDebug(1202) << k_funcinfo << "protocol: " << url.protocol()
<< " url: " << url.path() << endl;
@ -1226,7 +1226,7 @@ void KonqBaseListViewWidget::slotRefreshItems( const KFileItemList & entries )
reportItemCounts();
}
void KonqBaseListViewWidget::slotRedirection( const KURL & url )
void KonqBaseListViewWidget::slotRedirection( const KUrl & url )
{
kdDebug(1202) << k_funcinfo << url << endl;
@ -1321,7 +1321,7 @@ void KonqBaseListViewWidget::paintEmptyArea( QPainter *p, const QRect &r )
}
}
void KonqBaseListViewWidget::disableIcons( const KURL::List & lst )
void KonqBaseListViewWidget::disableIcons( const KUrl::List & lst )
{
iterator kit = begin();
for( ; kit != end(); ++kit )
@ -1329,7 +1329,7 @@ void KonqBaseListViewWidget::disableIcons( const KURL::List & lst )
bool bFound = false;
// Wow. This is ugly. Matching two lists together....
// Some sorting to optimise this would be a good idea ?
for (KURL::List::ConstIterator it = lst.begin(); !bFound && it != lst.end(); ++it)
for (KUrl::List::ConstIterator it = lst.begin(); !bFound && it != lst.end(); ++it)
{
if ( (*kit).item()->url() == *it ) // *it is encoded already
{
@ -1354,7 +1354,7 @@ void KonqBaseListViewWidget::restoreState( QDataStream & ds )
m_restored = true;
QString str;
KURL url;
KUrl url;
ds >> str >> url;
if ( !str.isEmpty() )
m_itemToGoTo = str;

View file

@ -86,7 +86,7 @@ public:
unsigned int NumberOfAtoms;
virtual void stop();
const KURL& url();
const KUrl& url();
struct iterator
{
@ -106,12 +106,12 @@ public:
iterator begin() { iterator it( (KonqBaseListViewItem *)firstChild() ); return it; }
iterator end() { iterator it; return it; }
virtual bool openURL( const KURL &url );
virtual bool openURL( const KUrl &url );
void selectedItems( Q3PtrList<KonqBaseListViewItem> *_list );
KFileItemList visibleFileItems();
KFileItemList selectedFileItems();
KURL::List selectedUrls( bool mostLocal = false );
KUrl::List selectedUrls( bool mostLocal = false );
/** @return the KonqListViewDir which handles the directory _url */
//virtual KonqListViewDir *findDir ( const QString & _url );
@ -143,7 +143,7 @@ public:
virtual void saveState( QDataStream & );
virtual void restoreState( QDataStream & );
virtual void disableIcons( const KURL::List& lst );
virtual void disableIcons( const KUrl::List& lst );
KonqListView *m_pBrowserView;
KonqFMSettings *m_pSettings;
@ -172,7 +172,7 @@ protected Q_SLOTS:
virtual void slotNewItems( const KFileItemList & );
virtual void slotDeleteItem( KFileItem * );
virtual void slotRefreshItems( const KFileItemList & );
virtual void slotRedirection( const KURL & );
virtual void slotRedirection( const KUrl & );
void slotPopupMenu( Q3ListViewItem *, const QPoint&, int );
// forces a repaint on column size changes / branch expansion
@ -189,7 +189,7 @@ protected:
//reads the configuration for the columns of the current
//protocol, it is called when the protocol changes
//it checks/unchecks the menu items and sets confColumns
void readProtocolConfig( const KURL& url );
void readProtocolConfig( const KUrl& url );
//calls updateContents of every ListViewItem, called after
//the columns changed
void updateListContents();
@ -257,7 +257,7 @@ protected:
int m_filenameColumn;
int m_filenameColumnWidth;
KURL m_url;
KUrl m_url;
QString m_itemToGoTo;
QStringList m_itemsToSelect;

View file

@ -35,12 +35,12 @@ KonqTreeViewWidget::KonqTreeViewWidget( KonqListView *parent, QWidget *parentWid
setRootIsDecorated( true );
setTreeStepSize( 20 );
connect( m_dirLister, SIGNAL( completed( const KURL & ) ),
this, SLOT( slotCompleted( const KURL & ) ) );
connect( m_dirLister, SIGNAL( clear( const KURL & ) ),
this, SLOT( slotClear( const KURL & ) ) );
connect( m_dirLister, SIGNAL( redirection( const KURL &, const KURL & ) ),
this, SLOT( slotRedirection( const KURL &, const KURL & ) ) );
connect( m_dirLister, SIGNAL( completed( const KUrl & ) ),
this, SLOT( slotCompleted( const KUrl & ) ) );
connect( m_dirLister, SIGNAL( clear( const KUrl & ) ),
this, SLOT( slotClear( const KUrl & ) ) );
connect( m_dirLister, SIGNAL( redirection( const KUrl &, const KUrl & ) ),
this, SLOT( slotRedirection( const KUrl &, const KUrl & ) ) );
}
KonqTreeViewWidget::~KonqTreeViewWidget()
@ -53,7 +53,7 @@ KonqTreeViewWidget::~KonqTreeViewWidget()
m_dictSubDirs.clear();
}
bool KonqTreeViewWidget::openURL( const KURL &url )
bool KonqTreeViewWidget::openURL( const KUrl &url )
{
//kdDebug(1202) << k_funcinfo << url.prettyURL() << endl;
@ -107,7 +107,7 @@ void KonqTreeViewWidget::slotCompleted()
KonqBaseListViewWidget::slotCompleted();
}
void KonqTreeViewWidget::slotCompleted( const KURL & _url )
void KonqTreeViewWidget::slotCompleted( const KUrl & _url )
{
// do nothing if the view itself is finished
if ( m_url.equals( _url, true ) )
@ -135,7 +135,7 @@ void KonqTreeViewWidget::slotClear()
KonqBaseListViewWidget::slotClear();
}
void KonqTreeViewWidget::slotClear( const KURL & _url )
void KonqTreeViewWidget::slotClear( const KUrl & _url )
{
// normally this means we have to delete only the contents of directory _url
// but we are allowed to delete the subdirs as well since the opening of
@ -177,7 +177,7 @@ void KonqTreeViewWidget::slotClear( const KURL & _url )
}
}
void KonqTreeViewWidget::slotRedirection( const KURL &oldUrl, const KURL &newUrl )
void KonqTreeViewWidget::slotRedirection( const KUrl &oldUrl, const KUrl &newUrl )
{
kdDebug(1202) << k_funcinfo << oldUrl.url() << " -> " << newUrl.url() << endl;
@ -190,7 +190,7 @@ void KonqTreeViewWidget::slotRedirection( const KURL &oldUrl, const KURL &newUrl
void KonqTreeViewWidget::slotNewItems( const KFileItemList &entries )
{
// Find parent item - it's the same for all the items
KURL dir( entries.first()->url().upURL() );
KUrl dir( entries.first()->url().upURL() );
KonqListViewDir *parentDir = 0L;
if ( !m_url.equals( dir, true ) ) // ignore trailing slash

View file

@ -37,7 +37,7 @@ public:
KonqTreeViewWidget( KonqListView *parent, QWidget *parentWidget );
virtual ~KonqTreeViewWidget();
virtual bool openURL( const KURL &url );
virtual bool openURL( const KUrl &url );
virtual void saveState( QDataStream &stream );
virtual void restoreState( QDataStream &stream );
@ -45,10 +45,10 @@ public:
protected Q_SLOTS:
// slots connected to the directory lister
virtual void slotCompleted();
virtual void slotCompleted( const KURL & );
virtual void slotCompleted( const KUrl & );
virtual void slotClear();
virtual void slotClear( const KURL & );
virtual void slotRedirection( const KURL &, const KURL & );
virtual void slotClear( const KUrl & );
virtual void slotRedirection( const KUrl &, const KUrl & );
virtual void slotNewItems( const KFileItemList & );
virtual void slotDeleteItem( KFileItem *_fileTtem );

View file

@ -86,7 +86,7 @@ KRemoteEncodingPlugin::loadSettings()
void
KRemoteEncodingPlugin::slotAboutToOpenURL()
{
KURL oldURL = m_currentURL;
KUrl oldURL = m_currentURL;
m_currentURL = m_part->url();
if (m_currentURL.protocol() != oldURL.protocol())

View file

@ -54,7 +54,7 @@ private:
KonqDirPart *m_part;
KActionMenu *m_menu;
QStringList m_encodingDescriptions;
KURL m_currentURL;
KUrl m_currentURL;
bool m_loaded;
int m_idDefault;

View file

@ -61,7 +61,7 @@ bool KAutoWebSearch::filterURI( KURIFilterData &data ) const
if (KURISearchFilterEngine::self()->verbose())
kdDebug() << "KAutoWebSearch::filterURI: '" << data.uri().url() << "'" << endl;
KURL u = data.uri();
KUrl u = data.uri();
if ( u.pass().isEmpty() )
{
QString result = KURISearchFilterEngine::self()->autoWebSearchQuery( data.typedString() );

View file

@ -215,7 +215,7 @@ static QString encodeString(const QString &s, int mib)
for(QStringList::Iterator it = l.begin();
it != l.end(); ++it)
{
*it = KURL::encode_string(*it, mib);
*it = KUrl::encode_string(*it, mib);
}
return l.join("+");
}
@ -419,7 +419,7 @@ QString KURISearchFilterEngine::formatResult( const QString& url,
}
// Decode user query:
QString userquery = KURL::decode_string(query, 106 /* utf-8*/);
QString userquery = KUrl::decode_string(query, 106 /* utf-8*/);
PDVAR ("user query", userquery);
PDVAR ("query definition", url);

View file

@ -48,7 +48,7 @@ LocalDomainURIFilter::LocalDomainURIFilter( QObject *parent, const char *name,
bool LocalDomainURIFilter::filterURI( KURIFilterData& data ) const
{
KURL url = data.uri();
KUrl url = data.uri();
QString cmd = url.url();
kdDebug() << "LocalDomainURIFilter::filterURI: " << url << endl;

View file

@ -150,7 +150,7 @@ bool KShortURIFilter::filterURI( KURIFilterData& data ) const
* hackable and is missing a config dialog.
*/
KURL url = data.uri();
KUrl url = data.uri();
QString cmd = data.typedString();
bool isMalformed = !url.isValid();
//kdDebug() << "url=" << url.url() << " cmd=" << cmd << " isMalformed=" << isMalformed << endl;
@ -221,7 +221,7 @@ bool KShortURIFilter::filterURI( KURIFilterData& data ) const
QString query;
QString nameFilter;
if (KURL::isRelativeURL(cmd) && QDir::isRelativePath(cmd)) {
if (KUrl::isRelativeURL(cmd) && QDir::isRelativePath(cmd)) {
path = cmd;
}
else
@ -295,7 +295,7 @@ bool KShortURIFilter::filterURI( KURIFilterData& data ) const
if ( expanded )
{
// Look for #ref again, after $ and ~ expansion (testcase: $QTDIR/doc/html/functions.html#s)
// Can't use KURL here, setPath would escape it...
// Can't use KUrl here, setPath would escape it...
int pos = path.find('#');
if ( pos > -1 )
{
@ -367,7 +367,7 @@ bool KShortURIFilter::filterURI( KURIFilterData& data ) const
//kdDebug() << "path =" << path << " isLocalFullPath=" << isLocalFullPath << " exists=" << exists << endl;
if( exists )
{
KURL u;
KUrl u;
u.setPath(path);
u.setRef(ref);
u.setQuery(query);
@ -481,7 +481,7 @@ bool KShortURIFilter::filterURI( KURIFilterData& data ) const
// and if it doesn't exist, then error
if( isLocalFullPath && !exists )
{
KURL u;
KUrl u;
u.setPath(path);
u.setRef(ref);

View file

@ -308,7 +308,7 @@ void KServiceListWidget::editService()
// If the path to the desktop file is relative, try to get the full
// path from KStdDirs.
path = locate("apps", path);
KURL serviceURL;
KUrl serviceURL;
serviceURL.setPath( path );
KFileItem item( serviceURL, "application/x-desktop", KFileItem::Unknown );
KPropertiesDialog dlg( &item, this, 0, true /*modal*/, false /*no auto-show*/ );

View file

@ -68,7 +68,7 @@ void KEnvVarProxyDlg::init()
void KEnvVarProxyDlg::setProxyData( const KProxyData& data )
{
// Setup HTTP Proxy...
KURL u ( data.proxyList["http"] );
KUrl u ( data.proxyList["http"] );
if (!u.isEmpty() && !u.isValid())
{
mEnvVarsMap["http"].name = data.proxyList["http"];

View file

@ -79,7 +79,7 @@ void KManualProxyDlg::init()
void KManualProxyDlg::setProxyData( const KProxyData &data )
{
KURL url;
KUrl url;
// Set the HTTP proxy...
if (!isValidURL(data.proxyList["http"], &url))
@ -235,7 +235,7 @@ void KManualProxyDlg::sameProxy( bool enable )
bool KManualProxyDlg::validate()
{
KURL filteredURL;
KUrl filteredURL;
unsigned short count = 0;
if ( isValidURL( mDlg->leHttp->text(), &filteredURL ) )
@ -397,7 +397,7 @@ QString KManualProxyDlg::urlFromInput(const KLineEdit* edit,
if (!edit)
return QString();
KURL u( edit->text() );
KUrl u( edit->text() );
if (spin)
u.setPort( spin->value() );
@ -405,9 +405,9 @@ QString KManualProxyDlg::urlFromInput(const KLineEdit* edit,
return u.url();
}
bool KManualProxyDlg::isValidURL( const QString& _url, KURL* result ) const
bool KManualProxyDlg::isValidURL( const QString& _url, KUrl* result ) const
{
KURL url (_url);
KUrl url (_url);
QStringList filters;
filters << "kshorturifilter" << "localdomainurifilter";

View file

@ -213,7 +213,7 @@ void KProxyDialog::save()
}
else if ( mDlg->rbAutoScript->isChecked() )
{
KURL u( mDlg->location->lineEdit()->text() );
KUrl u( mDlg->location->lineEdit()->text() );
if ( !u.isValid() )
{
@ -237,7 +237,7 @@ void KProxyDialog::save()
{
// Let's try a bit harder to determine if the previous
// proxy setting was indeed a manual proxy
KURL u ( mData->proxyList["http"] );
KUrl u ( mData->proxyList["http"] );
bool validProxy = (u.isValid() && u.port() != 0);
u= mData->proxyList["https"];
validProxy |= (u.isValid() && u.port() != 0);

View file

@ -97,7 +97,7 @@ KPreviewOptions::KPreviewOptions( KInstance *inst, QWidget *parent )
protocolList.sort();
QStringList::Iterator it = protocolList.begin();
KURL url;
KUrl url;
url.setPath("/");
for ( ; it != protocolList.end() ; ++it )

View file

@ -148,19 +148,19 @@ void DesktopPathConfig::save()
bool pathChanged = false;
bool autostartMoved = false;
KURL desktopURL;
KUrl desktopURL;
desktopURL.setPath( KGlobalSettings::desktopPath() );
KURL newDesktopURL;
KUrl newDesktopURL;
newDesktopURL.setPath(urDesktop->url());
KURL autostartURL;
KUrl autostartURL;
autostartURL.setPath( KGlobalSettings::autostartPath() );
KURL newAutostartURL;
KUrl newAutostartURL;
newAutostartURL.setPath(urAutostart->url());
KURL documentURL;
KUrl documentURL;
documentURL.setPath( KGlobalSettings::documentPath() );
KURL newDocumentURL;
KUrl newDocumentURL;
newDocumentURL.setPath(urDocument->url());
if ( !newDesktopURL.equals( desktopURL, true ) )
@ -190,7 +190,7 @@ void DesktopPathConfig::save()
// or it has been changed (->need to move it from here)
else
{
KURL futureAutostartURL;
KUrl futureAutostartURL;
futureAutostartURL.setPath( urlDesktop + "Autostart/" );
if ( newAutostartURL.equals( futureAutostartURL, true ) )
autostartMoved = true;
@ -261,7 +261,7 @@ void DesktopPathConfig::save()
kapp->dcopClient()->send( appname, "KDesktopIface", "configure()", data );
}
bool DesktopPathConfig::moveDir( const KURL & src, const KURL & dest, const QString & type )
bool DesktopPathConfig::moveDir( const KUrl & src, const KUrl & dest, const QString & type )
{
if (!src.isLocalFile() || !dest.isLocalFile())
return true;

View file

@ -51,10 +51,10 @@ private:
KUrlRequester *urAutostart;
KUrlRequester *urDocument;
bool moveDir( const KURL & src, const KURL & dest, const QString & type );
bool moveDir( const KUrl & src, const KUrl & dest, const QString & type );
bool m_ok;
KURL m_copyToDest; // used when the destination directory already exists
KURL m_copyFromSrc;
KUrl m_copyToDest; // used when the destination directory already exists
KUrl m_copyFromSrc;
private Q_SLOTS:
void slotResult( KIO::Job * job );

View file

@ -46,7 +46,7 @@ void KShellCmdPlugin::slotExecuteShellCommand()
KMessageBox::sorry(0L, "KShellCmdPlugin::slotExecuteShellCommand: Program error, please report a bug.");
return;
}
KURL url = part->url();
KUrl url = part->url();
if ( !url.isLocalFile() )
{
KMessageBox::sorry(part->widget(),i18n("Executing shell commands works only on local directories."));
@ -58,7 +58,7 @@ void KShellCmdPlugin::slotExecuteShellCommand()
// Putting the complete path to the selected file isn't really necessary,
// since we'll cd to the directory first. But we do need to get the
// complete relative path.
path = KURL::relativePath( url.path(),
path = KUrl::relativePath( url.path(),
part->currentItem()->url().path() );
}
else

View file

@ -36,8 +36,8 @@ KonqSidebar::KonqSidebar( QWidget *parentWidget, const char *widgetName,
connect(m_widget,SIGNAL(started(KIO::Job *)),
this, SIGNAL(started(KIO::Job*)));
connect(m_widget,SIGNAL(completed()),this,SIGNAL(completed()));
connect(m_extension, SIGNAL(addWebSideBar(const KURL&, const QString&)),
m_widget, SLOT(addWebSideBar(const KURL&, const QString&)));
connect(m_extension, SIGNAL(addWebSideBar(const KUrl&, const QString&)),
m_widget, SLOT(addWebSideBar(const KUrl&, const QString&)));
KAcceleratorManager::setNoAccel(m_widget);
setWidget(m_widget);
}
@ -57,7 +57,7 @@ bool KonqSidebar::openFile()
return true;
}
bool KonqSidebar::openURL(const KURL &url) {
bool KonqSidebar::openURL(const KUrl &url) {
if (m_widget)
return m_widget->openURL(url);
else return false;

View file

@ -51,7 +51,7 @@ class KonqSidebarBrowserExtension : public KParts::BrowserExtension
void copy(){if (widget) widget->stdAction("copy()");}
void cut(){if (widget) widget->stdAction("cut()");}
void paste(){if (widget) widget->stdAction("paste()");}
void pasteTo(const KURL&){if (widget) widget->stdAction("paste()");}
void pasteTo(const KUrl&){if (widget) widget->stdAction("paste()");}
void trash(){if (widget) widget->stdAction("trash()");}
void del(){if (widget) widget->stdAction("del()");}
void rename(){if (widget) widget->stdAction("rename()");}
@ -85,7 +85,7 @@ public:
*/
virtual ~KonqSidebar();
virtual bool openURL(const KURL &url);
virtual bool openURL(const KUrl &url);
KonqSidebarBrowserExtension* extension() const
{ return m_extension; }
KInstance *getInstance();

View file

@ -33,7 +33,7 @@ KonqSidebarPlugin::~KonqSidebarPlugin() { }
KInstance *KonqSidebarPlugin::parentInstance(){return m_parentInstance;}
void KonqSidebarPlugin::openURL(const KURL& url){handleURL(url);}
void KonqSidebarPlugin::openURL(const KUrl& url){handleURL(url);}
void KonqSidebarPlugin::openPreview(const KFileItemList& items)
{

View file

@ -40,7 +40,7 @@ class KDE_EXPORT KonqSidebarPlugin : public QObject
virtual void *provides(const QString &)=0;
KInstance *parentInstance();
protected:
virtual void handleURL(const KURL &url)=0;
virtual void handleURL(const KUrl &url)=0;
virtual void handlePreview(const KFileItemList & items);
virtual void handlePreviewOnMouseOver(const KFileItem &items); //not used yet, perhaps in KDE 3.1
QString desktopName;
@ -50,7 +50,7 @@ class KDE_EXPORT KonqSidebarPlugin : public QObject
KonqSidebarPluginPrivate *d;
Q_SIGNALS:
void requestURL(KURL&);
void requestURL(KUrl&);
void started(KIO::Job *);
void completed();
void setIcon(const QString& icon);
@ -60,7 +60,7 @@ class KDE_EXPORT KonqSidebarPlugin : public QObject
protected:
bool universalMode();
public Q_SLOTS:
void openURL(const KURL& url);
void openURL(const KUrl& url);
void openPreview(const KFileItemList& items);
@ -74,17 +74,17 @@ class KDE_EXPORT KonqSidebarPlugin : public QObject
/* signals, which could be, but need not to be added
void openURLRequest( const KURL &url, const KParts::URLArgs &args = KParts::URLArgs() );
void createNewWindow( const KURL &url, const KParts::URLArgs &args = KParts::URLArgs() );
void openURLRequest( const KUrl &url, const KParts::URLArgs &args = KParts::URLArgs() );
void createNewWindow( const KUrl &url, const KParts::URLArgs &args = KParts::URLArgs() );
void enableAction( const char * name, bool enabled );
void popupMenu( const QPoint &global, const KFileItemList &items );
void popupMenu( KXMLGUIClient *client, const QPoint &global, const KFileItemList &items );
void popupMenu( const QPoint &global, const KURL &url,
void popupMenu( const QPoint &global, const KUrl &url,
const QString &mimeType, mode_t mode = (mode_t)-1 );
void popupMenu( KXMLGUIClient *client,
const QPoint &global, const KURL &url,
const QPoint &global, const KUrl &url,
const QString &mimeType, mode_t mode = (mode_t)-1 );
void showError(QString &); //for later extension

View file

@ -308,7 +308,7 @@ Sidebar_Widget::Sidebar_Widget(QWidget *parent, KParts::ReadOnlyPart *par, const
this, SLOT(dockWidgetHasUndocked(K3DockWidget*)));
}
void Sidebar_Widget::addWebSideBar(const KURL& url, const QString& /*name*/) {
void Sidebar_Widget::addWebSideBar(const KUrl& url, const QString& /*name*/) {
//kdDebug() << "Web sidebar entry to be added: " << url.url()
// << " [" << name << "]" << endl;
@ -1060,17 +1060,17 @@ KParts::URLArgs args;
emit getExtension()->openURLRequest(KURL( url ), args);
}
void Sidebar_Widget::openURLRequest( const KURL &url, const KParts::URLArgs &args)
void Sidebar_Widget::openURLRequest( const KUrl &url, const KParts::URLArgs &args)
{
getExtension()->openURLRequest(url,args);
}
void Sidebar_Widget::createNewWindow( const KURL &url, const KParts::URLArgs &args)
void Sidebar_Widget::createNewWindow( const KUrl &url, const KParts::URLArgs &args)
{
getExtension()->createNewWindow(url,args);
}
void Sidebar_Widget::createNewWindow( const KURL &url, const KParts::URLArgs &args,
void Sidebar_Widget::createNewWindow( const KUrl &url, const KParts::URLArgs &args,
const KParts::WindowArgs &windowArgs, KParts::ReadOnlyPart *&part )
{
getExtension()->createNewWindow(url,args,windowArgs,part);
@ -1133,7 +1133,7 @@ void Sidebar_Widget::popupMenu( KXMLGUIClient *client, const QPoint &global, con
getExtension()->popupMenu(client,global,items);
}
void Sidebar_Widget::popupMenu( const QPoint &global, const KURL &url,
void Sidebar_Widget::popupMenu( const QPoint &global, const KUrl &url,
const QString &mimeType, mode_t mode)
{
if (doEnableActions())
@ -1141,7 +1141,7 @@ void Sidebar_Widget::popupMenu( const QPoint &global, const KURL &url,
}
void Sidebar_Widget::popupMenu( KXMLGUIClient *client,
const QPoint &global, const KURL &url,
const QPoint &global, const KUrl &url,
const QString &mimeType, mode_t mode )
{
if (doEnableActions())
@ -1159,16 +1159,16 @@ void Sidebar_Widget::connectModule(QObject *mod)
}
if (mod->metaObject()->indexOfSignal("popupMenu(QPoint,KURL,QString,mode_t)") != -1) {
connect(mod,SIGNAL(popupMenu( const QPoint &, const KURL &,
connect(mod,SIGNAL(popupMenu( const QPoint &, const KUrl &,
const QString &, mode_t)),this,SLOT(popupMenu( const
QPoint &, const KURL&, const QString &, mode_t)));
QPoint &, const KUrl&, const QString &, mode_t)));
}
if (mod->metaObject()->indexOfSignal("popupMenu(KXMLGUIClient*,QPoint,KURL,QString,mode_t)") != -1) {
connect(mod,SIGNAL(popupMenu( KXMLGUIClient *, const QPoint &,
const KURL &,const QString &, mode_t)),this,
const KUrl &,const QString &, mode_t)),this,
SLOT(popupMenu( KXMLGUIClient *, const QPoint &,
const KURL &,const QString &, mode_t)));
const KUrl &,const QString &, mode_t)));
}
if (mod->metaObject()->indexOfSignal("popupMenu(QPoint,KFileItemList)") != -1) {
@ -1177,8 +1177,8 @@ void Sidebar_Widget::connectModule(QObject *mod)
}
if (mod->metaObject()->indexOfSignal("openURLRequest(KURL,KParts::URLArgs)") != -1) {
connect(mod,SIGNAL(openURLRequest( const KURL &, const KParts::URLArgs &)),
this,SLOT(openURLRequest( const KURL &, const KParts::URLArgs &)));
connect(mod,SIGNAL(openURLRequest( const KUrl &, const KParts::URLArgs &)),
this,SLOT(openURLRequest( const KUrl &, const KParts::URLArgs &)));
}
if (mod->metaObject()->indexOfSignal("submitFormRequest(const char*,QString,QByteArray,QString,QString,QString)") != -1) {
@ -1194,8 +1194,8 @@ void Sidebar_Widget::connectModule(QObject *mod)
}
if (mod->metaObject()->indexOfSignal("createNewWindow(KURL,KParts::URLArgs)") != -1) {
connect(mod,SIGNAL(createNewWindow( const KURL &, const KParts::URLArgs &)),
this,SLOT(createNewWindow( const KURL &, const KParts::URLArgs &)));
connect(mod,SIGNAL(createNewWindow( const KUrl &, const KParts::URLArgs &)),
this,SLOT(createNewWindow( const KUrl &, const KParts::URLArgs &)));
}
}

View file

@ -34,7 +34,7 @@ class SidebarTest : public KonqSidebarPlugin
virtual void *provides(const QString &) {return 0;}
protected:
QLabel *widget;
virtual void handleURL(const KURL &url)
virtual void handleURL(const KUrl &url)
{
widget->setText(url.url());
}

View file

@ -56,7 +56,7 @@ void KonqSidebarBookmarkItem::del()
//maybe todo
}
KURL KonqSidebarBookmarkItem::externalURL() const
KUrl KonqSidebarBookmarkItem::externalURL() const
{
return m_bk.isGroup() ? KURL() : m_bk.url();
}

View file

@ -41,7 +41,7 @@ public:
virtual void del();
// The URL to open when this link is clicked
virtual KURL externalURL() const;
virtual KUrl externalURL() const;
// overwrite this if you want a tooltip shown on your item
virtual QString toolTipText() const;

View file

@ -363,7 +363,7 @@ void KonqSidebarBookmarkModule::slotProperties(KonqSidebarBookmarkItem *bi)
makeTextNodeMod(bookmark, "title", dlg.finalTitle());
if ( !dlg.finalUrl().isNull() )
{
KURL u = KURL::fromPathOrURL(dlg.finalUrl());
KUrl u = KUrl::fromPathOrURL(dlg.finalUrl());
bookmark.internalElement().setAttribute("href", u.url(0, 106));
}

View file

@ -61,7 +61,7 @@ void KonqSidebarDirTreeItem::reset()
// For local dirs, find out if they have no children, to remove the "+"
if ( m_fileItem->isDir() )
{
KURL url = m_fileItem->url();
KUrl url = m_fileItem->url();
if ( url.isLocalFile() )
{
QByteArray path( QFile::encodeName(url.path()));
@ -119,7 +119,7 @@ void KonqSidebarDirTreeItem::paintCell( QPainter *_painter, const QColorGroup &
Q3ListViewItem::paintCell( _painter, _cg, _column, _width, _alignment );
}
KURL KonqSidebarDirTreeItem::externalURL() const
KUrl KonqSidebarDirTreeItem::externalURL() const
{
return m_fileItem->url();
}
@ -146,10 +146,10 @@ void KonqSidebarDirTreeItem::drop( QDropEvent * ev )
bool KonqSidebarDirTreeItem::populateMimeData( QMimeData* mimeData, bool move )
{
KURL::List lst;
KUrl::List lst;
lst.append( m_fileItem->url() );
KonqMimeData::populateMimeData( mimeData, KURL::List(), lst, move );
KonqMimeData::populateMimeData( mimeData, KUrl::List(), lst, move );
return true;
}
@ -223,7 +223,7 @@ void KonqSidebarDirTreeItem::shred()
void KonqSidebarDirTreeItem::delOperation( int method )
{
KURL::List lst;
KUrl::List lst;
lst.append(m_fileItem->url());
KonqOperations::del(tree(), method, lst);

View file

@ -51,7 +51,7 @@ public:
virtual void shred();
// The URL to open when this link is clicked
virtual KURL externalURL() const;
virtual KUrl externalURL() const;
virtual QString externalMimeType() const;
virtual QString toolTipText() const;

View file

@ -53,15 +53,15 @@ KonqSidebarDirTreeModule::~KonqSidebarDirTreeModule()
// KDirLister may still emit canceled while being deleted.
if (m_dirLister)
{
disconnect( m_dirLister, SIGNAL( canceled( const KURL & ) ),
this, SLOT( slotListingStopped( const KURL & ) ) );
disconnect( m_dirLister, SIGNAL( canceled( const KUrl & ) ),
this, SLOT( slotListingStopped( const KUrl & ) ) );
delete m_dirLister;
}
}
KURL::List KonqSidebarDirTreeModule::selectedUrls()
KUrl::List KonqSidebarDirTreeModule::selectedUrls()
{
KURL::List lst;
KUrl::List lst;
KonqSidebarDirTreeItem *selection = static_cast<KonqSidebarDirTreeItem *>( m_pTree->selectedItem() );
if( !selection )
{
@ -80,7 +80,7 @@ void KonqSidebarDirTreeModule::addTopLevelItem( KonqSidebarTreeTopLevelItem * it
KDesktopFile cfg( item->path(), true );
cfg.setDollarExpansion(true);
KURL targetURL;
KUrl targetURL;
targetURL.setPath(item->path());
if ( cfg.hasLinkType() )
@ -313,12 +313,12 @@ void KonqSidebarDirTreeModule::openSubFolder( KonqSidebarTreeItem *item )
this, SLOT( slotRefreshItems( const KFileItemList & ) ) );
connect( m_dirLister, SIGNAL( deleteItem( KFileItem * ) ),
this, SLOT( slotDeleteItem( KFileItem * ) ) );
connect( m_dirLister, SIGNAL( completed( const KURL & ) ),
this, SLOT( slotListingStopped( const KURL & ) ) );
connect( m_dirLister, SIGNAL( canceled( const KURL & ) ),
this, SLOT( slotListingStopped( const KURL & ) ) );
connect( m_dirLister, SIGNAL( redirection( const KURL &, const KURL & ) ),
this, SLOT( slotRedirection( const KURL &, const KURL & ) ) );
connect( m_dirLister, SIGNAL( completed( const KUrl & ) ),
this, SLOT( slotListingStopped( const KUrl & ) ) );
connect( m_dirLister, SIGNAL( canceled( const KUrl & ) ),
this, SLOT( slotListingStopped( const KUrl & ) ) );
connect( m_dirLister, SIGNAL( redirection( const KUrl &, const KUrl & ) ),
this, SLOT( slotRedirection( const KUrl &, const KUrl & ) ) );
}
@ -339,7 +339,7 @@ void KonqSidebarDirTreeModule::listDirectory( KonqSidebarTreeItem *item )
{
// This causes a reparsing, but gets rid of the trailing slash
QString strUrl = item->externalURL().url(-1);
KURL url( strUrl );
KUrl url( strUrl );
Q3PtrList<KonqSidebarTreeItem> *itemList;
KonqSidebarTreeItem * openItem;
@ -405,7 +405,7 @@ void KonqSidebarDirTreeModule::slotNewItems( const KFileItemList& entries )
KFileItem * firstItem = entries.first();
// Find parent item - it's the same for all the items
KURL dir( firstItem->url().url(-1) );
KUrl dir( firstItem->url().url(-1) );
dir.setFileName( "" );
kdDebug(1201) << this << " KonqSidebarDirTreeModule::slotNewItems dir=" << dir.url(-1) << endl;
@ -537,7 +537,7 @@ void KonqSidebarDirTreeModule::slotDeleteItem( KFileItem *fileItem )
delete itemList;
}
void KonqSidebarDirTreeModule::slotRedirection( const KURL & oldUrl, const KURL & newUrl )
void KonqSidebarDirTreeModule::slotRedirection( const KUrl & oldUrl, const KUrl & newUrl )
{
kdDebug(1201) << "******************************KonqSidebarDirTreeModule::slotRedirection(" << newUrl.prettyURL() << ")" << endl;
@ -568,7 +568,7 @@ void KonqSidebarDirTreeModule::slotRedirection( const KURL & oldUrl, const KURL
delete itemList;
}
void KonqSidebarDirTreeModule::slotListingStopped( const KURL & url )
void KonqSidebarDirTreeModule::slotListingStopped( const KUrl & url )
{
kdDebug(1201) << "KonqSidebarDirTree::slotListingStopped " << url.url(-1) << endl;
@ -592,13 +592,13 @@ void KonqSidebarDirTreeModule::slotListingStopped( const KURL & url )
kdDebug(1201) << "m_selectAfterOpening " << m_selectAfterOpening.prettyURL() << endl;
if ( !m_selectAfterOpening.isEmpty() && url.isParentOf( m_selectAfterOpening ) )
{
KURL theURL( m_selectAfterOpening );
KUrl theURL( m_selectAfterOpening );
m_selectAfterOpening = KURL();
followURL( theURL );
}
}
void KonqSidebarDirTreeModule::followURL( const KURL & url )
void KonqSidebarDirTreeModule::followURL( const KUrl & url )
{
// Check if we already know this URL
KonqSidebarTreeItem * item = m_dictSubDirs[ url.url(-1) ];
@ -609,7 +609,7 @@ void KonqSidebarDirTreeModule::followURL( const KURL & url )
return;
}
KURL uParent( url );
KUrl uParent( url );
KonqSidebarTreeItem * parentItem = 0L;
// Go up to the first known parent
do

View file

@ -42,7 +42,7 @@ public:
virtual void openTopLevelItem( KonqSidebarTreeTopLevelItem * item );
virtual void followURL( const KURL & url );
virtual void followURL( const KUrl & url );
// Called by KonqSidebarDirTreeItem
void openSubFolder( KonqSidebarTreeItem *item );
@ -53,13 +53,13 @@ private Q_SLOTS:
void slotNewItems( const KFileItemList & );
void slotRefreshItems( const KFileItemList & );
void slotDeleteItem( KFileItem *item );
void slotRedirection( const KURL & oldUrl, const KURL & newUrl );
void slotListingStopped( const KURL & url );
void slotRedirection( const KUrl & oldUrl, const KUrl & newUrl );
void slotListingStopped( const KUrl & url );
private:
//KonqSidebarTreeItem * findDir( const KURL &_url );
//KonqSidebarTreeItem * findDir( const KUrl &_url );
void listDirectory( KonqSidebarTreeItem *item );
KURL::List selectedUrls();
KUrl::List selectedUrls();
// URL -> item
// Each KonqSidebarDirTreeItem is indexed on item->id() and
@ -71,7 +71,7 @@ private:
KDirLister * m_dirLister;
KURL m_selectAfterOpening;
KUrl m_selectAfterOpening;
KonqSidebarTreeTopLevelItem * m_topLevelItem;

View file

@ -156,7 +156,7 @@ void KonqSidebarHistoryItem::paintCell( QPainter *p, const QColorGroup & cg,
///////////////////////////////////////////////////////////////////
KonqSidebarHistoryGroupItem::KonqSidebarHistoryGroupItem( const KURL& url,
KonqSidebarHistoryGroupItem::KonqSidebarHistoryGroupItem( const KUrl& url,
KonqSidebarTreeTopLevelItem *topLevelItem)
: KonqSidebarTreeItem( topLevelItem, topLevelItem ),
m_hasFavIcon( false ),
@ -174,7 +174,7 @@ void KonqSidebarHistoryGroupItem::setFavIcon( const QPixmap& pix )
// when the last child is removed
void KonqSidebarHistoryGroupItem::remove()
{
KURL::List list;
KUrl::List list;
KonqSidebarHistoryItem *child = static_cast<KonqSidebarHistoryItem*>( firstChild() );
while( child ) {
list.append( child->externalURL() );

View file

@ -41,8 +41,8 @@ public:
virtual void itemSelected();
// The URL to open when this link is clicked
virtual KURL externalURL() const { return m_entry->url; }
const KURL& url() const { return m_entry->url; } // a faster one
virtual KUrl externalURL() const { return m_entry->url; }
const KUrl& url() const { return m_entry->url; } // a faster one
virtual QString toolTipText() const;
QString host() const { return m_entry->url.host(); }
@ -72,7 +72,7 @@ class KonqSidebarHistoryGroupItem : public KonqSidebarTreeItem
{
public:
KonqSidebarHistoryGroupItem( const KURL& url, KonqSidebarTreeTopLevelItem * );
KonqSidebarHistoryGroupItem( const KUrl& url, KonqSidebarTreeTopLevelItem * );
/**
* removes itself and all its children from the history (not just the view)
@ -98,11 +98,11 @@ public:
// we don't support the following of KonqSidebarTreeItem
bool acceptsDrops( const QStrList& ) { return false; }
virtual void drop( QDropEvent * ) {}
virtual KURL externalURL() const { return KURL(); }
virtual KUrl externalURL() const { return KURL(); }
private:
bool m_hasFavIcon;
const KURL m_url;
const KUrl m_url;
QDateTime m_lastVisited;
};

View file

@ -278,7 +278,7 @@ void KonqSidebarHistoryModule::slotRemoveEntry()
void KonqSidebarHistoryModule::slotPreferences()
{
// Run the history sidebar settings.
KRun::run( "kcmshell kcmhistory", KURL::List() );
KRun::run( "kcmshell kcmhistory", KUrl::List() );
}
void KonqSidebarHistoryModule::slotSortByName()
@ -321,7 +321,7 @@ void KonqSidebarHistoryModule::groupOpened( KonqSidebarHistoryGroupItem *item, b
}
KonqSidebarHistoryGroupItem * KonqSidebarHistoryModule::getGroupItem( const KURL& url )
KonqSidebarHistoryGroupItem * KonqSidebarHistoryModule::getGroupItem( const KUrl& url )
{
const QString& groupKey = groupForURL( url );
KonqSidebarHistoryGroupItem *group = m_dict.find( groupKey );

View file

@ -60,7 +60,7 @@ public:
const QDateTime& currentTime() const { return m_currentTime; }
bool sortsByName() const { return m_sortsByName; }
static QString groupForURL( const KURL& url ) {
static QString groupForURL( const KUrl& url ) {
static const QString& misc = KGlobal::staticQString(i18n("Miscellaneous"));
return url.host().isEmpty() ? misc : url.host();
}
@ -86,7 +86,7 @@ private Q_SLOTS:
void slotClearHistory();
private:
KonqSidebarHistoryGroupItem *getGroupItem( const KURL& url );
KonqSidebarHistoryGroupItem *getGroupItem( const KUrl& url );
void sortingChanged();
typedef Q3DictIterator<KonqSidebarHistoryGroupItem> HistoryItemIterator;

View file

@ -240,7 +240,7 @@ void KonqSidebarTree::clearTree()
}
}
void KonqSidebarTree::followURL( const KURL &url )
void KonqSidebarTree::followURL( const KUrl &url )
{
// Maybe we're there already ?
KonqSidebarTreeItem *selection = static_cast<KonqSidebarTreeItem *>( selectedItem() );
@ -339,10 +339,10 @@ void KonqSidebarTree::contentsDropEvent( QDropEvent *ev )
if ( !selectedItem() )
{
// KonqOperations::doDrop( 0L, m_dirtreeDir.dir, ev, this );
KURL::List urls;
KUrl::List urls;
if ( K3URLDrag::decode( ev, urls ) )
{
for(KURL::List::ConstIterator it = urls.begin();
for(KUrl::List::ConstIterator it = urls.begin();
it != urls.end(); ++it)
{
addURL(0, *it);
@ -373,7 +373,7 @@ static QString findUniqueFilename(const QString &path, QString filename)
return path+filename+".desktop";
}
void KonqSidebarTree::addURL(KonqSidebarTreeTopLevelItem* item, const KURL & url)
void KonqSidebarTree::addURL(KonqSidebarTreeTopLevelItem* item, const KUrl & url)
{
QString path;
if (item)
@ -381,7 +381,7 @@ void KonqSidebarTree::addURL(KonqSidebarTreeTopLevelItem* item, const KURL & url
else
path = m_dirtreeDir.dir.path();
KURL destUrl;
KUrl destUrl;
if (url.isLocalFile() && url.fileName().endsWith(".desktop"))
{
@ -490,7 +490,7 @@ void KonqSidebarTree::slotExecuted( Q3ListViewItem *item )
args.serviceType = dItem->externalMimeType();
args.trustedSource = true;
KURL externalURL = dItem->externalURL();
KUrl externalURL = dItem->externalURL();
if ( !externalURL.isEmpty() )
openURLRequest( externalURL, args );
}
@ -565,7 +565,7 @@ void KonqSidebarTree::slotSelectionChanged()
}
}
void KonqSidebarTree::FilesAdded( const KURL & dir )
void KonqSidebarTree::FilesAdded( const KUrl & dir )
{
kdDebug(1201) << "KonqSidebarTree::FilesAdded " << dir.url() << endl;
if ( m_dirtreeDir.dir.isParentOf( dir ) )
@ -573,10 +573,10 @@ void KonqSidebarTree::FilesAdded( const KURL & dir )
QTimer::singleShot( 0, this, SLOT( rescanConfiguration() ) );
}
void KonqSidebarTree::FilesRemoved( const KURL::List & urls )
void KonqSidebarTree::FilesRemoved( const KUrl::List & urls )
{
//kdDebug(1201) << "KonqSidebarTree::FilesRemoved " << urls.count() << endl;
for ( KURL::List::ConstIterator it = urls.begin() ; it != urls.end() ; ++it )
for ( KUrl::List::ConstIterator it = urls.begin() ; it != urls.end() ; ++it )
{
//kdDebug(1201) << "KonqSidebarTree::FilesRemoved " << (*it).prettyURL() << endl;
if ( m_dirtreeDir.dir.isParentOf( *it ) )
@ -588,7 +588,7 @@ void KonqSidebarTree::FilesRemoved( const KURL::List & urls )
}
}
void KonqSidebarTree::FilesChanged( const KURL::List & urls )
void KonqSidebarTree::FilesChanged( const KUrl::List & urls )
{
//kdDebug(1201) << "KonqSidebarTree::FilesChanged" << endl;
// not same signal, but same implementation
@ -694,7 +694,7 @@ void KonqSidebarTree::scanDir( KonqSidebarTreeItem *parent, const QString &path,
for (; eIt != eEnd; ++eIt )
{
QString filePath = QString( *eIt ).prepend( path );
KURL u;
KUrl u;
u.setPath( filePath );
if ( KMimeType::findByURL( u, 0, true )->name() == "application/x-desktop" )
loadTopLevelItem( parent, filePath );
@ -1021,7 +1021,7 @@ void KonqSidebarTree::slotProperties()
{
if (!m_currentTopLevelItem) return;
KURL url;
KUrl url;
url.setPath(m_currentTopLevelItem->path());
KPropertiesDialog *dlg = new KPropertiesDialog( url );
@ -1046,7 +1046,7 @@ void KonqSidebarTree::slotOpenTab()
void KonqSidebarTree::slotCopyLocation()
{
if (!m_currentTopLevelItem) return;
KURL url = m_currentTopLevelItem->externalURL();
KUrl url = m_currentTopLevelItem->externalURL();
kapp->clipboard()->setData( new K3URLDrag(url, 0), QClipboard::Selection );
kapp->clipboard()->setData( new K3URLDrag(url, 0), QClipboard::Clipboard );
}

View file

@ -53,7 +53,7 @@ typedef KonqSidebarTreeModule*(*getModule)(KonqSidebarTree*, const bool);
typedef struct DirTreeConfigData_
{
KURL dir;
KUrl dir;
int type;
QString relDir;
} DirTreeConfigData;
@ -76,7 +76,7 @@ public:
KonqSidebarTree( KonqSidebar_Tree *parent, QWidget *parentWidget, int virt, const QString& path );
virtual ~KonqSidebarTree();
void followURL( const KURL &url );
void followURL( const KUrl &url );
/**
* @return the current (i.e. selected) item
@ -87,9 +87,9 @@ public:
void stopAnimation( KonqSidebarTreeItem * item );
// Reimplemented from KDirNotify
void FilesAdded( const KURL & dir );
void FilesRemoved( const KURL::List & urls );
void FilesChanged( const KURL::List & urls );
void FilesAdded( const KUrl & dir );
void FilesRemoved( const KUrl::List & urls );
void FilesChanged( const KUrl::List & urls );
KonqSidebarPlugin * part() { return m_part; }
@ -108,7 +108,7 @@ public:
void showToplevelContextMenu();
// Add an URL
void addURL(KonqSidebarTreeTopLevelItem* item, const KURL&url);
void addURL(KonqSidebarTreeTopLevelItem* item, const KUrl&url);
// If we can use dcop to open tabs
bool tabSupport();
@ -189,7 +189,7 @@ private:
QTimer *m_autoOpenTimer;
// The base URL for our configuration directory
//KURL m_dirtreeDir;
//KUrl m_dirtreeDir;
DirTreeConfigData m_dirtreeDir;
bool m_scrollingLocked;
@ -213,9 +213,9 @@ signals:
#undef signals
#define signals protected
#endif
void openURLRequest( const KURL &url, const KParts::URLArgs &args = KParts::URLArgs() );
void createNewWindow( const KURL &url, const KParts::URLArgs &args = KParts::URLArgs() );
void popupMenu( const QPoint &global, const KURL &url,
void openURLRequest( const KUrl &url, const KParts::URLArgs &args = KParts::URLArgs() );
void createNewWindow( const KUrl &url, const KParts::URLArgs &args = KParts::URLArgs() );
void popupMenu( const QPoint &global, const KUrl &url,
const QString &mimeType, mode_t mode = (mode_t)-1 );
void popupMenu( const QPoint &global, const KFileItemList &items );
void enableAction( const char * name, bool enabled );

View file

@ -69,7 +69,7 @@ public:
virtual void rename() {}
// The URL to open when this link is clicked
virtual KURL externalURL() const = 0;
virtual KUrl externalURL() const = 0;
// The mimetype to use when this link is clicked
// If unknown, return QString(), konq will determine the mimetype itself

View file

@ -47,7 +47,7 @@ public:
// Follow a URL opened in another view - only implement if the module
// has anything to do with URLs
virtual void followURL( const KURL & ) {}
virtual void followURL( const KUrl & ) {}
KonqSidebarTree *tree() const { return m_pTree; }
bool showHidden() { return m_showHidden;}

View file

@ -69,10 +69,10 @@ void KonqSidebarTreeTopLevelItem::drop( QDropEvent * ev )
{
// When dropping something to "Network" or its subdirs, we want to create
// a desktop link, not to move/copy/link - except for .desktop files :-}
KURL::List lst;
KUrl::List lst;
if ( K3URLDrag::decode( ev, lst ) && !lst.isEmpty() ) // Are they urls ?
{
KURL::List::Iterator it = lst.begin();
KUrl::List::Iterator it = lst.begin();
for ( ; it != lst.end() ; it++ )
{
tree()->addURL(this, *it);
@ -90,12 +90,12 @@ void KonqSidebarTreeTopLevelItem::drop( QDropEvent * ev )
bool KonqSidebarTreeTopLevelItem::populateMimeData( QMimeData* mimeData, bool move )
{
// 100% duplicated from KonqDirTreeItem::dragObject :(
KURL::List lst;
KURL url;
KUrl::List lst;
KUrl url;
url.setPath( path() );
lst.append( url );
KonqMimeData::populateMimeData( mimeData, KURL::List(), lst, move );
KonqMimeData::populateMimeData( mimeData, KUrl::List(), lst, move );
#if 0 // was this ever used? Seems populateMimeData is only used for copy/cut, not for dragging?
const QPixmap * pix = pixmap(0);
@ -118,7 +118,7 @@ void KonqSidebarTreeTopLevelItem::middleButtonClicked()
void KonqSidebarTreeTopLevelItem::rightButtonPressed()
{
KURL url;
KUrl url;
url.setPath( m_path );
// We don't show "edit file type" (useless here) and "properties" (shows the wrong name,
// i.e. the filename instead of the Name field). There's the Rename item for that.
@ -148,9 +148,9 @@ void KonqSidebarTreeTopLevelItem::shred()
void KonqSidebarTreeTopLevelItem::delOperation( int method )
{
KURL url;
KUrl url;
url.setPath( m_path );
KURL::List lst;
KUrl::List lst;
lst.append(url);
KonqOperations::del(tree(), method, lst);
@ -166,7 +166,7 @@ void KonqSidebarTreeTopLevelItem::paste()
kdDebug(1201) << "move (from clipboard data) = " << move << endl;
}
KURL destURL;
KUrl destURL;
if ( m_bTopLevelGroup )
destURL.setPath( m_path );
else
@ -182,7 +182,7 @@ void KonqSidebarTreeTopLevelItem::rename()
void KonqSidebarTreeTopLevelItem::rename( const QString & name )
{
KURL url;
KUrl url;
url.setPath( m_path );
// Well, it's not really the file we want to rename, it's the Name field
@ -198,7 +198,7 @@ void KonqSidebarTreeTopLevelItem::rename( const QString & name )
cfg.sync();
// Notify about the change
KURL::List lst;
KUrl::List lst;
lst.append(url);
KDirNotify_stub allDirNotify("*", "KDirNotify*");
allDirNotify.FilesChanged( lst );

View file

@ -71,7 +71,7 @@ public:
// Whether the item is a toplevel item - true
virtual bool isTopLevelItem() const { return true; }
virtual KURL externalURL() const { return m_externalURL; }
virtual KUrl externalURL() const { return m_externalURL; }
virtual QString toolTipText() const;
@ -79,7 +79,7 @@ public:
// The module should call this for each toplevel item that is passed to it
// unless it calls setClickable(false)
void setExternalURL( const KURL & url ) { m_externalURL = url; }
void setExternalURL( const KUrl & url ) { m_externalURL = url; }
// Whether the item is a toplevel group. [Only matters for dnd]
void setTopLevelGroup( bool b ) { m_bTopLevelGroup = b; }
@ -96,7 +96,7 @@ protected:
KonqSidebarTreeModule *m_module;
QString m_path;
QString m_comment;
KURL m_externalURL;
KUrl m_externalURL;
bool m_bTopLevelGroup;
};

View file

@ -32,14 +32,14 @@ KonqSidebar_Tree::KonqSidebar_Tree(KInstance *instance,QObject *parent,QWidget *
tree=new KonqSidebarTree(this,widget,virt,desktopName_);
}
connect(tree, SIGNAL( openURLRequest( const KURL &, const KParts::URLArgs &)),
this,SIGNAL( openURLRequest( const KURL &, const KParts::URLArgs &)));
connect(tree, SIGNAL( openURLRequest( const KUrl &, const KParts::URLArgs &)),
this,SIGNAL( openURLRequest( const KUrl &, const KParts::URLArgs &)));
connect(tree,SIGNAL(createNewWindow( const KURL &, const KParts::URLArgs &)),
this,SIGNAL(createNewWindow( const KURL &, const KParts::URLArgs &)));
connect(tree,SIGNAL(createNewWindow( const KUrl &, const KParts::URLArgs &)),
this,SIGNAL(createNewWindow( const KUrl &, const KParts::URLArgs &)));
connect(tree,SIGNAL(popupMenu( const QPoint &, const KURL &, const QString &, mode_t )),
this,SIGNAL(popupMenu( const QPoint &, const KURL &, const QString &, mode_t )));
connect(tree,SIGNAL(popupMenu( const QPoint &, const KUrl &, const QString &, mode_t )),
this,SIGNAL(popupMenu( const QPoint &, const KUrl &, const QString &, mode_t )));
connect(tree,SIGNAL(popupMenu( const QPoint &, const KFileItemList & )),
this,SIGNAL(popupMenu( const QPoint &, const KFileItemList & )));
@ -58,7 +58,7 @@ void* KonqSidebar_Tree::provides(const QString &) {return 0;}
QWidget *KonqSidebar_Tree::getWidget(){return widget;}
void KonqSidebar_Tree::handleURL(const KURL &url)
void KonqSidebar_Tree::handleURL(const KUrl &url)
{
emit started( 0 );
tree->followURL( url );

View file

@ -25,7 +25,7 @@ class KonqSidebar_Tree: public KonqSidebarPlugin
protected:
class QWidget *widget;
class KonqSidebarTree *tree;
virtual void handleURL(const KURL &url);
virtual void handleURL(const KUrl &url);
protected Q_SLOTS:
void copy();
void cut();
@ -35,9 +35,9 @@ class KonqSidebar_Tree: public KonqSidebarPlugin
void shred();
void rename();
Q_SIGNALS:
void openURLRequest( const KURL &url, const KParts::URLArgs &args = KParts::URLArgs() );
void createNewWindow( const KURL &url, const KParts::URLArgs &args = KParts::URLArgs() );
void popupMenu( const QPoint &global, const KURL &url,
void openURLRequest( const KUrl &url, const KParts::URLArgs &args = KParts::URLArgs() );
void createNewWindow( const KUrl &url, const KParts::URLArgs &args = KParts::URLArgs() );
void popupMenu( const QPoint &global, const KUrl &url,
const QString &mimeType, mode_t mode = (mode_t)-1 );
void popupMenu( const QPoint &global, const KFileItemList &items );
void enableAction( const char * name, bool enabled );

View file

@ -47,9 +47,9 @@ KonqSideBarWebModule::KonqSideBarWebModule(KInstance *instance, QObject *parent,
this,
SLOT(urlClicked(const QString&, KParts::URLArgs)));
connect(_htmlPart->browserExtension(),
SIGNAL(openURLRequest(const KURL&, const KParts::URLArgs&)),
SIGNAL(openURLRequest(const KUrl&, const KParts::URLArgs&)),
this,
SLOT(formClicked(const KURL&, const KParts::URLArgs&)));
SLOT(formClicked(const KUrl&, const KParts::URLArgs&)));
connect(_htmlPart,
SIGNAL(setAutoReload()), this, SLOT( setAutoReload() ));
connect(_htmlPart,
@ -115,7 +115,7 @@ void *KonqSideBarWebModule::provides(const QString &) {
}
void KonqSideBarWebModule::handleURL(const KURL &) {
void KonqSideBarWebModule::handleURL(const KUrl &) {
}
@ -131,7 +131,7 @@ void KonqSideBarWebModule::urlClicked(const QString& url, KParts::URLArgs args)
}
void KonqSideBarWebModule::formClicked(const KURL& url, const KParts::URLArgs& args)
void KonqSideBarWebModule::formClicked(const KUrl& url, const KParts::URLArgs& args)
{
_htmlPart->browserExtension()->setURLArgs(args);
_htmlPart->openURL(url);
@ -193,7 +193,7 @@ extern "C" {
KDE_EXPORT bool add_konqsidebar_web(QString* fn, QString* param, QMap<QString,QString> *map) {
Q_UNUSED(param);
KGlobal::dirs()->addResourceType("websidebardata", KStandardDirs::kde_default("data") + "konqsidebartng/websidebar");
KURL url;
KUrl url;
url.setProtocol("file");
QStringList paths = KGlobal::dirs()->resourceDirs("websidebardata");
for (QStringList::Iterator i = paths.begin(); i != paths.end(); ++i) {

View file

@ -135,7 +135,7 @@ class KHTMLSideBar : public KHTMLPart
if (QString(action).toLower() != "post") {
// GET
KURL kurl = completeURL(url);
KUrl kurl = completeURL(url);
kurl.setQuery(formData.data());
u = kurl.url();
} else {
@ -175,14 +175,14 @@ class KonqSideBarWebModule : public KonqSidebarPlugin
Q_SIGNALS:
void submitFormRequest(const char*,const QString&,const QByteArray&,const QString&,const QString&,const QString&);
void openURLRequest(const KURL &url, const KParts::URLArgs &args);
void createNewWindow(const KURL &url, const KParts::URLArgs &args);
void openURLRequest(const KUrl &url, const KParts::URLArgs &args);
void createNewWindow(const KUrl &url, const KParts::URLArgs &args);
protected:
virtual void handleURL(const KURL &url);
virtual void handleURL(const KUrl &url);
private Q_SLOTS:
void urlClicked(const QString& url, KParts::URLArgs args);
void formClicked(const KURL& url, const KParts::URLArgs& args);
void formClicked(const KUrl& url, const KParts::URLArgs& args);
void urlNewWindow(const QString& url, KParts::URLArgs args);
void pageLoaded();
void loadFavicon();
@ -192,7 +192,7 @@ class KonqSideBarWebModule : public KonqSidebarPlugin
private:
KHTMLSideBar *_htmlPart;
KURL _url;
KUrl _url;
int reloadTimeout;
QString _desktopName;
};

View file

@ -170,7 +170,7 @@ void KWrite::setupActions()
KStdAction::openNew( this, SLOT(slotNew()), actionCollection(), "file_new" )->setWhatsThis(i18n("Use this command to create a new document"));
KStdAction::open( this, SLOT( slotOpen() ), actionCollection(), "file_open" )->setWhatsThis(i18n("Use this command to open an existing document for editing"));
m_recentFiles = KStdAction::openRecent(this, SLOT(slotOpen(const KURL&)),
m_recentFiles = KStdAction::openRecent(this, SLOT(slotOpen(const KUrl&)),
actionCollection());
m_recentFiles->setWhatsThis(i18n("This lists files which you have opened recently, and allows you to easily open them again."));
@ -236,7 +236,7 @@ void KWrite::setupStatusBar()
}
// load on url
void KWrite::loadURL(const KURL &url)
void KWrite::loadURL(const KUrl &url)
{
m_view->document()->openURL(url);
}
@ -277,14 +277,14 @@ void KWrite::slotOpen()
{
KEncodingFileDialog::Result r=KEncodingFileDialog::getOpenURLsAndEncoding(m_view->document()->encoding(), m_view->document()->url().url(),QString(),this,i18n("Open File"));
for (KURL::List::Iterator i=r.URLs.begin(); i != r.URLs.end(); ++i)
for (KUrl::List::Iterator i=r.URLs.begin(); i != r.URLs.end(); ++i)
{
encoding = r.encoding;
slotOpen ( *i );
}
}
void KWrite::slotOpen( const KURL& url )
void KWrite::slotOpen( const KUrl& url )
{
if (url.isEmpty()) return;
@ -356,7 +356,7 @@ void KWrite::editToolbars()
void KWrite::dragEnterEvent( QDragEnterEvent *event )
{
KURL::List uriList = KURL::List::fromMimeData( event->mimeData() );
KUrl::List uriList = KUrl::List::fromMimeData( event->mimeData() );
event->accept(!uriList.isEmpty());
}
@ -367,12 +367,12 @@ void KWrite::dropEvent( QDropEvent *event )
void KWrite::slotDropEvent( QDropEvent *event )
{
KURL::List textlist = KURL::List::fromMimeData( event->mimeData() );
KUrl::List textlist = KUrl::List::fromMimeData( event->mimeData() );
if (textlist.isEmpty())
return;
for (KURL::List::Iterator i=textlist.begin(); i != textlist.end(); ++i)
for (KUrl::List::Iterator i=textlist.begin(); i != textlist.end(); ++i)
slotOpen (*i);
}

View file

@ -48,7 +48,7 @@ class KWrite : public KParts::MainWindow
KWrite(KTextEditor::Document * = 0L);
~KWrite();
void loadURL(const KURL &url);
void loadURL(const KUrl &url);
KTextEditor::View *view() const { return m_view; }
@ -67,7 +67,7 @@ class KWrite : public KParts::MainWindow
void slotNew();
void slotFlush ();
void slotOpen();
void slotOpen( const KURL& url);
void slotOpen( const KUrl& url);
void newView();
void toggleStatusBar();
void editKeys();

View file

@ -87,7 +87,7 @@ QString removeSlash(QString result)
}
QString FaviconsModule::iconForURL(const KURL &url)
QString FaviconsModule::iconForURL(const KUrl &url)
{
if (url.host().isEmpty())
return QString();
@ -114,7 +114,7 @@ QString FaviconsModule::iconForURL(const KURL &url)
return QString();
}
QString FaviconsModule::simplifyURL(const KURL &url)
QString FaviconsModule::simplifyURL(const KUrl &url)
{
// splat any = in the URL so it can be safely used as a config key
QString result = url.host() + url.path();
@ -124,7 +124,7 @@ QString FaviconsModule::simplifyURL(const KURL &url)
return result;
}
QString FaviconsModule::iconNameFromURL(const KURL &iconURL)
QString FaviconsModule::iconNameFromURL(const KUrl &iconURL)
{
if (iconURL.path() == "/favicon.ico")
return iconURL.host();
@ -151,7 +151,7 @@ bool FaviconsModule::isIconOld(const QString &icon)
return (time(0) - st.st_mtime) > 604800; // arbitrary value (one week)
}
void FaviconsModule::setIconForURL(const KURL &url, const KURL &iconURL)
void FaviconsModule::setIconForURL(const KUrl &url, const KUrl &iconURL)
{
QString simplifiedURL = simplifyURL(url);
@ -168,7 +168,7 @@ void FaviconsModule::setIconForURL(const KURL &url, const KURL &iconURL)
startDownload(simplifiedURL, false, iconURL);
}
void FaviconsModule::downloadHostIcon(const KURL &url)
void FaviconsModule::downloadHostIcon(const KUrl &url)
{
QString iconFile = d->faviconsDir + "favicons/" + url.host() + ".png";
if (!isIconOld(iconFile))
@ -177,7 +177,7 @@ void FaviconsModule::downloadHostIcon(const KURL &url)
startDownload(url.host(), true, KURL(url, "/favicon.ico"));
}
void FaviconsModule::startDownload(const QString &hostOrURL, bool isHost, const KURL &iconURL)
void FaviconsModule::startDownload(const QString &hostOrURL, bool isHost, const KUrl &iconURL)
{
if (d->failedDownloads.contains(iconURL.url()))
return;
@ -210,7 +210,7 @@ void FaviconsModule::slotResult(KIO::Job *job)
{
FaviconsModulePrivate::DownloadInfo download = d->downloads[job];
d->downloads.remove(job);
KURL iconURL = static_cast<KIO::TransferJob *>(job)->url();
KUrl iconURL = static_cast<KIO::TransferJob *>(job)->url();
QString iconName;
if (!job->error())
{

View file

@ -60,7 +60,7 @@ k_dcop:
* @return the icon name suitable to pass to @ref KIconLoader or
* QString() if no icon for this URL was found.
*/
QString iconForURL(const KURL &url);
QString iconForURL(const KUrl &url);
/**
* Assiciates an icon with the given URL. If the icon was not
* downloaded before or the downloaded was too long ago, a
@ -70,7 +70,7 @@ k_dcop:
* @param url the URL which will be associated with the icon
* @param iconURL the URL of the icon to be downloaded
*/
ASYNC setIconForURL(const KURL &url, const KURL &iconURL);
ASYNC setIconForURL(const KUrl &url, const KUrl &iconURL);
/**
* Downloads the icon for a given host if it was not downloaded before
* or the download was too long ago. If the download finishes
@ -78,16 +78,16 @@ k_dcop:
*
* @param url any URL on the host for which the icon is to be downloaded
*/
ASYNC downloadHostIcon(const KURL &url);
ASYNC downloadHostIcon(const KUrl &url);
k_dcop_signals:
void iconChanged(bool isHost, QString hostOrURL, QString iconName);
void infoMessage(KURL iconURL, QString msg);
void infoMessage(KUrl iconURL, QString msg);
private:
void startDownload(const QString &, bool, const KURL &);
QString simplifyURL(const KURL &);
QString iconNameFromURL(const KURL &);
void startDownload(const QString &, bool, const KUrl &);
QString simplifyURL(const KUrl &);
QString iconNameFromURL(const KUrl &);
bool isIconOld(const QString &);
private Q_SLOTS:

View file

@ -300,11 +300,11 @@ bool KFileIVI::acceptDrop( const QMimeSource *mime ) const
return true;
// Use cache
KURL::List uris = ( static_cast<KonqIconViewWidget*>(iconView()) )->dragURLs();
KUrl::List uris = ( static_cast<KonqIconViewWidget*>(iconView()) )->dragURLs();
// Check if we want to drop something on itself
// (Nothing will happen, but it's a convenient way to move icons)
KURL::List::Iterator it = uris.begin();
KUrl::List::Iterator it = uris.begin();
for ( ; it != uris.end() ; it++ )
{
if ( m_fileitem->url().equals( *it, true /*ignore trailing slashes*/ ) )

Some files were not shown because too many files have changed in this diff Show more