Commit 17261c5f authored by Lukáš Tinkl's avatar Lukáš Tinkl

port Konqueror from KUrl to QUrl

REVIEW: 120650
parent bbf9ea80
......@@ -354,17 +354,17 @@ void SearchBarPlugin::menuActionTriggered(QAction *action)
const QString openSearchTitle = action->data().toString();
if (!openSearchTitle.isEmpty()) {
const QString openSearchHref = m_openSearchDescs.value(openSearchTitle);
KUrl url;
QUrl url;
if (QUrl(openSearchHref).isRelative()) {
const KUrl docUrl = m_part ? m_part.data()->url() : KUrl();
const QUrl docUrl = m_part ? m_part.data()->url() : QUrl();
QString host = docUrl.scheme() + QLatin1String("://") + docUrl.host();
if (docUrl.port() != -1) {
host += QLatin1String(":") + QString::number(docUrl.port());
}
url = KUrl(docUrl, openSearchHref);
url = QUrl(docUrl, openSearchHref);
}
else {
url = KUrl(openSearchHref);
url = QUrl(openSearchHref);
}
//kDebug() << "Adding open search Engine: " << openSearchTitle << " : " << openSearchHref;
m_openSearchManager->addOpenSearchEngine(url, openSearchTitle);
......
......@@ -14,7 +14,6 @@
#include <kmessagebox.h>
#include <kpluginfactory.h>
#include <ksavefile.h>
#include <kurl.h>
#include <kstandarddirs.h>
#include <ktoolinvocation.h>
......@@ -40,7 +39,7 @@ QString KonqAboutPageSingleton::loadFile( const QString& file )
QFile f( file );
if ( !f.open( QIODevice::ReadOnly ) )
return res;
return res;
QTextStream t( &f );
......@@ -61,7 +60,7 @@ QString KonqAboutPageSingleton::launch()
QString res = loadFile( KStandardDirs::locate( "data", "konqueror/about/launch.html" ));
if ( res.isEmpty() )
return res;
return res;
KIconLoader *iconloader = KIconLoader::global();
int iconSize = iconloader->currentSize(KIconLoader::Desktop);
......@@ -72,9 +71,9 @@ QString KonqAboutPageSingleton::launch()
QString home_folder = QDir::homePath();
QString continue_icon_path = iconloader->iconPath(QApplication::isRightToLeft() ? "go-previous" : "go-next", KIconLoader::Small );
res = res.arg( KStandardDirs::locate( "data", "kdeui/about/kde_infopage.css" ) );
res = res.arg( KStandardDirs::locate( "data", "kf5/infopage/kde_infopage.css" ) );
if ( qApp->layoutDirection() == Qt::RightToLeft )
res = res.arg( "@import \"%1\";" ).arg( KStandardDirs::locate( "data", "kdeui/about/kde_infopage_rtl.css" ) );
res = res.arg( "@import \"%1\";" ).arg( KStandardDirs::locate( "data", "kf5/infopage/kde_infopage_rtl.css" ) );
else
res = res.arg( "" );
......@@ -128,9 +127,9 @@ QString KonqAboutPageSingleton::intro()
QString gohome_icon_path = iconloader->iconPath("go-home", KIconLoader::Small );
QString continue_icon_path = iconloader->iconPath(QApplication::isRightToLeft() ? "go-previous" : "go-next", KIconLoader::Small );
res = res.arg( KStandardDirs::locate( "data", "kdeui/about/kde_infopage.css" ) );
res = res.arg( KStandardDirs::locate( "data", "kf5/infopage/kde_infopage.css" ) );
if ( qApp->layoutDirection() == Qt::RightToLeft )
res = res.arg( "@import \"%1\";" ).arg( KStandardDirs::locate( "data", "kdeui/about/kde_infopage_rtl.css" ) );
res = res.arg( "@import \"%1\";" ).arg( KStandardDirs::locate( "data", "kf5/infopage/kde_infopage_rtl.css" ) );
else
res = res.arg( "" );
......@@ -180,13 +179,13 @@ QString KonqAboutPageSingleton::specs()
QString res = loadFile( KStandardDirs::locate( "data", "konqueror/about/specs.html" ));
QString continue_icon_path = iconloader->iconPath(QApplication::isRightToLeft() ? "go-previous" : "go-next", KIconLoader::Small );
if ( res.isEmpty() )
return res;
return res;
res = res.arg( KStandardDirs::locate( "data", "kdeui/about/kde_infopage.css" ) );
res = res.arg( KStandardDirs::locate( "data", "kf5/infopage/kde_infopage.css" ) );
if ( qApp->layoutDirection() == Qt::RightToLeft )
res = res.arg( "@import \"%1\";" ).arg( KStandardDirs::locate( "data", "kdeui/about/kde_infopage_rtl.css" ) );
res = res.arg( "@import \"%1\";" ).arg( KStandardDirs::locate( "data", "kf5/infopage/kde_infopage_rtl.css" ) );
else
res = res.arg( "" );
res = res.arg( "" );
res = res.arg( i18nc("KDE 4 tag line, see http://kde.org/img/kde40.png", "Be free.") )
.arg( i18n( "Konqueror" ) )
......@@ -214,12 +213,12 @@ QString KonqAboutPageSingleton::specs()
.arg( i18n("built-in") )
.arg( i18n("<A HREF=\"%1\">ECMA-262</A> Edition 3 (roughly equals JavaScript 1.5)",
QString("http://www.ecma-international.org/publications/standards/ECMA-262.HTM")) )
.arg( i18n("JavaScript disabled (globally). Enable JavaScript <A HREF=\"%1\">here</A>.", QString("exec:/kcmshell4 khtml_java_js")) )
.arg( i18n("JavaScript enabled (globally). Configure JavaScript <A HREF=\\\"%1\\\">here</A>.", QString("exec:/kcmshell4 khtml_java_js")) ) // leave the double backslashes here, they are necessary for javascript !
.arg( i18n("JavaScript disabled (globally). Enable JavaScript <A HREF=\"%1\">here</A>.", QString("exec:/kcmshell5 khtml_java_js")) )
.arg( i18n("JavaScript enabled (globally). Configure JavaScript <A HREF=\\\"%1\\\">here</A>.", QString("exec:/kcmshell5 khtml_java_js")) ) // leave the double backslashes here, they are necessary for javascript !
.arg( i18n("Secure <A HREF=\"%1\">Java</A><SUP>&reg;</SUP> support", QString("http://www.oracle.com/technetwork/java/index.html")) )
.arg( i18n("JDK 1.2.0 (Java 2) compatible VM (<A HREF=\"%1\">IBM</A> or <A HREF=\"%2\">Sun/Oracle</A>)",
QString("http://www.ibm.com"), QString("http://www.oracle.com/technetwork/java/index.html")) )
.arg( i18n("Enable Java (globally) <A HREF=\"%1\">here</A>.", QString("exec:/kcmshell4 khtml_java_js")) ) // TODO Maybe test if Java is enabled ?
.arg( i18n("Enable Java (globally) <A HREF=\"%1\">here</A>.", QString("exec:/kcmshell5 khtml_java_js")) ) // TODO Maybe test if Java is enabled ?
.arg( i18n("Netscape Communicator<SUP>&reg;</SUP> <A HREF=\"%4\">plugins</A> (for viewing <A HREF=\"%1\">Flash<SUP>&reg;</SUP></A>, <A HREF=\"%2\">Real<SUP>&reg;</SUP></A>Audio, <A HREF=\"%3\">Real<SUP>&reg;</SUP></A>Video, etc.)",
QString("http://www.macromedia.com/shockwave/download/index.cgi?P1_Prod_Version=ShockwaveFlash"),
QString("http://www.real.com"), QString("http://www.real.com"),
......@@ -280,9 +279,9 @@ QString KonqAboutPageSingleton::tips()
iconloader->iconPath("view-split-left-right", KIconLoader::Small );
QString continue_icon_path = iconloader->iconPath(QApplication::isRightToLeft() ? "go-previous" : "go-next", KIconLoader::Small );
res = res.arg( KStandardDirs::locate( "data", "kdeui/about/kde_infopage.css" ) );
res = res.arg( KStandardDirs::locate( "data", "kf5/infopage/kde_infopage.css" ) );
if ( qApp->layoutDirection() == Qt::RightToLeft )
res = res.arg( "@import \"%1\";" ).arg( KStandardDirs::locate( "data", "kdeui/about/kde_infopage_rtl.css" ) );
res = res.arg( "@import \"%1\";" ).arg( KStandardDirs::locate( "data", "kf5/infopage/kde_infopage_rtl.css" ) );
else
res = res.arg( "" );
......@@ -299,7 +298,7 @@ QString KonqAboutPageSingleton::tips()
"using Google, for the search phrase \"KDE\". There are a lot of "
"Web-Shortcuts predefined to make searching for software or looking "
"up certain words in an encyclopedia a breeze. You can even "
"<a href=\"%1\">create your own</a> Web-Shortcuts." , QString("exec:/kcmshell4 ebrowsing")) )
"<a href=\"%1\">create your own</a> Web-Shortcuts." , QString("exec:/kcmshell5 webshortcuts")) )
.arg( i18n( "Use the magnifier button <img width='16' height='16' src=\"%1\"></img> in the HTML"
" toolbar to increase the font size on your web page.", viewmag_icon_path) )
.arg( i18n( "When you want to paste a new address into the Location toolbar you might want to "
......@@ -319,11 +318,11 @@ QString KonqAboutPageSingleton::tips()
", or create your own ones." , view_left_right_icon_path))
.arg( i18n( "Use the <a href=\"%1\">user-agent</a> feature if the website you are visiting "
"asks you to use a different browser "
"(and do not forget to send a complaint to the webmaster!)" , QString("exec:/kcmshell4 useragent")) )
"(and do not forget to send a complaint to the webmaster!)" , QString("exec:/kcmshell5 useragent")) )
.arg( i18n( "The <img width='16' height='16' src=\"%1\"></img> History in your Sidebar ensures "
"that you can keep track of the pages you have visited recently.", history_icon_path) )
.arg( i18n( "Use a caching <a href=\"%1\">proxy</a> to speed up your"
" Internet connection.", QString("exec:/kcmshell4 proxy")) )
" Internet connection.", QString("exec:/kcmshell5 proxy")) )
.arg( i18n( "Advanced users will appreciate the Konsole which you can embed into "
"Konqueror (Settings -> <img width='16' height='16' SRC=\"%1\"></img> Show "
"Terminal Emulator).", openterm_icon_path))
......
......@@ -339,7 +339,7 @@ void ClientApp::sendASNChange()
static bool krun_has_error = false;
bool ClientApp::createNewWindow(const KUrl & url, bool newTab, bool tempFile, const QString & mimetype)
bool ClientApp::createNewWindow(const QUrl & url, bool newTab, bool tempFile, const QString & mimetype)
{
kDebug() << url << "mimetype=" << mimetype;
needInstance();
......
......@@ -35,7 +35,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 QUrl &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());
......
[Desktop Entry]
Type=Application
Exec=kfmclient openProfile webbrowsing
Exec=konqueror --profile webbrowsing
Icon=konqueror
X-DocPath=konqueror/index.html
......
......@@ -73,14 +73,14 @@ void KonqSidebarHistoryModule::slotPressed(const QModelIndex& index)
void KonqSidebarHistoryModule::slotClicked(const QModelIndex& index)
{
if (m_lastPressedButtons & Qt::MidButton) {
const KUrl url = m_historyView->urlForIndex(index);
const QUrl url = m_historyView->urlForIndex(index);
if (url.isValid()) {
createNewWindow(url);
}
}
}
void KonqSidebarHistoryModule::slotOpenWindow(const KUrl& url)
void KonqSidebarHistoryModule::slotOpenWindow(const QUrl& url)
{
KParts::OpenUrlArguments args;
args.setActionRequestedByUser(true);
......@@ -89,7 +89,7 @@ void KonqSidebarHistoryModule::slotOpenWindow(const KUrl& url)
createNewWindow(url, args, browserArgs);
}
void KonqSidebarHistoryModule::slotOpenTab(const KUrl& url)
void KonqSidebarHistoryModule::slotOpenTab(const QUrl& url)
{
KParts::OpenUrlArguments args;
args.setActionRequestedByUser(true);
......
......@@ -22,6 +22,7 @@
#define HISTORY_MODULE_H
#include <konqsidebarplugin.h>
class QModelIndex;
class KonqHistoryView;
......@@ -38,8 +39,8 @@ private Q_SLOTS:
void slotActivated(const QModelIndex& index);
void slotPressed(const QModelIndex& index);
void slotClicked(const QModelIndex& index);
void slotOpenWindow(const KUrl& url);
void slotOpenTab(const KUrl& url);
void slotOpenWindow(const QUrl &url);
void slotOpenTab(const QUrl& url);
private:
KonqHistoryView* m_historyView;
......
......@@ -20,7 +20,9 @@
#include "konqmultitabbar.h"
#include <QDragEnterEvent>
#include <kdebug.h>
#include <QMimeData>
#include <KUrlMimeData>
KonqMultiTabBar::KonqMultiTabBar(QWidget* parent)
: KMultiTabBar(KMultiTabBar::Left, parent)
......@@ -30,20 +32,20 @@ KonqMultiTabBar::KonqMultiTabBar(QWidget* parent)
void KonqMultiTabBar::dragEnterEvent(QDragEnterEvent* event)
{
if (KUrl::List::canDecode(event->mimeData())) {
if (event->mimeData()->hasUrls()) {
event->accept();
}
}
void KonqMultiTabBar::dragMoveEvent(QDragMoveEvent* event)
{
if (KUrl::List::canDecode(event->mimeData())) {
if (event->mimeData()->hasUrls()) {
event->accept();
}
}
void KonqMultiTabBar::dropEvent(QDropEvent* event)
{
const KUrl::List urls = KUrl::List::fromMimeData(event->mimeData());
const QList<QUrl> urls = KUrlMimeData::urlsFromMimeData(event->mimeData());
emit urlsDropped(urls);
}
......@@ -21,7 +21,7 @@
#ifndef KONQMULTITABBAR_H
#define KONQMULTITABBAR_H
#include <kurl.h>
#include <QUrl>
#include <kmultitabbar.h>
class KonqMultiTabBar : public KMultiTabBar
......@@ -32,7 +32,7 @@ public:
explicit KonqMultiTabBar(QWidget* parent);
Q_SIGNALS:
void urlsDropped(const KUrl::List& urls);
void urlsDropped(const QList<QUrl>& urls);
protected:
virtual void dragEnterEvent(QDragEnterEvent* event);
......
......@@ -86,7 +86,7 @@ protected:
* Called by the sidebar's openUrl. Reimplement this in order to
* follow the navigation happening in konqueror's current view.
*/
virtual void handleURL(const KUrl &url) { Q_UNUSED(url); }
virtual void handleURL(const QUrl &url) { Q_UNUSED(url); }
virtual void handlePreview(const KFileItemList & items);
virtual void handlePreviewOnMouseOver(const KFileItem &items); //not used yet
......@@ -106,12 +106,12 @@ Q_SIGNALS:
/**
* Ask konqueror to open @p url.
*/
void openUrlRequest(const KUrl &url, const KParts::OpenUrlArguments& args = KParts::OpenUrlArguments(),
void openUrlRequest(const QUrl &url, const KParts::OpenUrlArguments& args = KParts::OpenUrlArguments(),
const KParts::BrowserArguments& browserArgs = KParts::BrowserArguments());
/**
* Ask konqueror to create a new window (or tab, see BrowserArguments) for @p url.
*/
void createNewWindow(const KUrl &url, const KParts::OpenUrlArguments& args = KParts::OpenUrlArguments(),
void createNewWindow(const QUrl &url, const KParts::OpenUrlArguments& args = KParts::OpenUrlArguments(),
const KParts::BrowserArguments& browserArgs = KParts::BrowserArguments(),
const KParts::WindowArgs& = KParts::WindowArgs());
......
......@@ -52,7 +52,7 @@ void KonqPlacesCustomPlacesView::mousePressEvent(QMouseEvent *event)
KFilePlacesView::mousePressEvent(event);
}
void KonqPlacesCustomPlacesView::emitUrlChanged(const KUrl &url)
void KonqPlacesCustomPlacesView::emitUrlChanged(const QUrl &url)
{
emit urlChanged(url, m_mouseButtons, m_keyModifiers);
}
......@@ -81,7 +81,7 @@ QWidget *KonqSideBarPlacesModule::getWidget()
return m_placesView;
}
void KonqSideBarPlacesModule::slotPlaceUrlChanged(const KUrl &url, Qt::MouseButtons buttons, Qt::KeyboardModifiers modifiers)
void KonqSideBarPlacesModule::slotPlaceUrlChanged(const QUrl &url, Qt::MouseButtons buttons, Qt::KeyboardModifiers modifiers)
{
if ((buttons & Qt::MidButton) != 0 || (modifiers & Qt::ControlModifier) != 0) {
emit createNewWindow(url);
......
......@@ -36,14 +36,14 @@ public:
virtual ~KonqPlacesCustomPlacesView();
signals:
void urlChanged(const KUrl &url, Qt::MouseButtons buttons, Qt::KeyboardModifiers);
void urlChanged(const QUrl &url, Qt::MouseButtons buttons, Qt::KeyboardModifiers);
protected:
virtual void keyPressEvent(QKeyEvent *event);
virtual void mousePressEvent(QMouseEvent *event);
private slots:
void emitUrlChanged(const KUrl &url);
void emitUrlChanged(const QUrl &url);
private:
Qt::MouseButtons m_mouseButtons;
......@@ -63,7 +63,7 @@ public:
virtual QWidget *getWidget();
private slots:
void slotPlaceUrlChanged(const KUrl &url, Qt::MouseButtons buttons, Qt::KeyboardModifiers modifiers);
void slotPlaceUrlChanged(const QUrl &url, Qt::MouseButtons buttons, Qt::KeyboardModifiers modifiers);
private:
KFilePlacesView *m_placesView;
......
......@@ -144,8 +144,8 @@ Sidebar_Widget::Sidebar_Widget(QWidget *parent, KParts::ReadOnlyPart *par, const
m_area->setMinimumWidth(0);
m_buttonBar = new KonqMultiTabBar(this);
connect(m_buttonBar, SIGNAL(urlsDropped(KUrl::List)),
this, SLOT(slotUrlsDropped(KUrl::List)));
connect(m_buttonBar, SIGNAL(urlsDropped(QList<QUrl>)),
this, SLOT(slotUrlsDropped(QList<QUrl>)));
m_menu = new QMenu(this);
m_menu->setIcon(QIcon::fromTheme("configure"));
......@@ -180,7 +180,7 @@ Sidebar_Widget::Sidebar_Widget(QWidget *parent, KParts::ReadOnlyPart *par, const
bool Sidebar_Widget::createDirectModule(const QString& templ,
const QString& name,
const KUrl& url,
const QUrl &url,
const QString& icon,
const QString& module,
const QString& treeModule)
......@@ -207,7 +207,7 @@ bool Sidebar_Widget::createDirectModule(const QString& templ,
return false;
}
void Sidebar_Widget::addWebSideBar(const KUrl& url, const QString& name)
void Sidebar_Widget::addWebSideBar(const QUrl& url, const QString& name)
{
//kDebug() << "Web sidebar entry to be added: " << url << name << endl;
......@@ -218,8 +218,7 @@ void Sidebar_Widget::addWebSideBar(const KUrl& url, const QString& name)
KConfigGroup scf(&_scf, "Desktop Entry");
if (scf.readPathEntry("URL", QString()) == url.url()) {
// We already have this one!
KMessageBox::information(this,
i18n("This entry already exists."));
KMessageBox::information(this, i18n("This entry already exists."));
return;
}
}
......@@ -453,9 +452,9 @@ void Sidebar_Widget::createButtons()
m_noUpdate = false;
}
bool Sidebar_Widget::openUrl(const KUrl &url)
bool Sidebar_Widget::openUrl(const QUrl &url)
{
if (url.protocol()=="sidebar")
if (url.scheme()=="sidebar")
{
for (int i=0;i<m_buttons.count();i++)
if (m_buttons.at(i).file==url.path())
......@@ -720,15 +719,15 @@ void Sidebar_Widget::submitFormRequest(const char *action,
browserArguments.postData = formData;
browserArguments.setDoPost(QByteArray(action).toLower() == "post");
// boundary?
emit getExtension()->openUrlRequest(KUrl( url ), arguments, browserArguments);
emit getExtension()->openUrlRequest(QUrl( url ), arguments, browserArguments);
}
void Sidebar_Widget::openUrlRequest( const KUrl &url, const KParts::OpenUrlArguments& args, const KParts::BrowserArguments& browserArgs)
void Sidebar_Widget::openUrlRequest(const QUrl &url, const KParts::OpenUrlArguments& args, const KParts::BrowserArguments& browserArgs)
{
getExtension()->openUrlRequest(url, args, browserArgs);
}
void Sidebar_Widget::createNewWindow(const KUrl &url, const KParts::OpenUrlArguments& args, const KParts::BrowserArguments& browserArgs,
void Sidebar_Widget::createNewWindow(const QUrl &url, const KParts::OpenUrlArguments& args, const KParts::BrowserArguments& browserArgs,
const KParts::WindowArgs &windowArgs)
{
getExtension()->createNewWindow(url, args, browserArgs, windowArgs);
......@@ -760,10 +759,10 @@ void Sidebar_Widget::connectModule(KonqSidebarModule *mod)
connect(mod, SIGNAL(popupMenu(KonqSidebarModule*,QPoint,KFileItemList,KParts::OpenUrlArguments,KParts::BrowserArguments,KParts::BrowserExtension::PopupFlags,KParts::BrowserExtension::ActionGroupMap)),
this, SLOT(slotPopupMenu(KonqSidebarModule*,QPoint,KFileItemList,KParts::OpenUrlArguments,KParts::BrowserArguments,KParts::BrowserExtension::PopupFlags,KParts::BrowserExtension::ActionGroupMap)));
connect(mod, SIGNAL(openUrlRequest(KUrl,KParts::OpenUrlArguments,KParts::BrowserArguments)),
this, SLOT(openUrlRequest(KUrl,KParts::OpenUrlArguments,KParts::BrowserArguments)));
connect(mod, SIGNAL(createNewWindow(KUrl,KParts::OpenUrlArguments,KParts::BrowserArguments,KParts::WindowArgs)),
this, SLOT(createNewWindow(KUrl,KParts::OpenUrlArguments,KParts::BrowserArguments,KParts::WindowArgs)));
connect(mod, SIGNAL(openUrlRequest(QUrl,KParts::OpenUrlArguments,KParts::BrowserArguments)),
this, SLOT(openUrlRequest(QUrl,KParts::OpenUrlArguments,KParts::BrowserArguments)));
connect(mod, SIGNAL(createNewWindow(QUrl,KParts::OpenUrlArguments,KParts::BrowserArguments,KParts::WindowArgs)),
this, SLOT(createNewWindow(QUrl,KParts::OpenUrlArguments,KParts::BrowserArguments,KParts::WindowArgs)));
// TODO define in base class
if (mod->metaObject()->indexOfSignal("submitFormRequest(const char*,QString,QByteArray,QString,QString,QString)") != -1) {
......@@ -827,9 +826,9 @@ void Sidebar_Widget::slotPopupMenu(KonqSidebarModule* module,
emit getExtension()->popupMenu(global, items, args, browserArgs, flags, actionGroups);
}
void Sidebar_Widget::slotUrlsDropped(const KUrl::List& urls)
void Sidebar_Widget::slotUrlsDropped(const QList<QUrl>& urls)
{
Q_FOREACH(const KUrl& url, urls) {
Q_FOREACH(const QUrl& url, urls) {
KIO::StatJob *job = KIO::stat(url);
KJobWidgets::setWindow(job, this);
connect(job, &KIO::StatJob::result, this, &Sidebar_Widget::slotStatResult);
......
......@@ -21,9 +21,9 @@
#include <kconfiggroup.h>
#include <QtCore/QTimer>
#include <QtCore/QPointer>
#include <QPointer>
#include <QUrl>
#include <kurl.h>
#include <kparts/part.h>
#include "konqsidebarplugin.h"
......@@ -78,14 +78,14 @@ public:
Sidebar_Widget(QWidget *parent, KParts::ReadOnlyPart *par,
const QString &currentProfile);
~Sidebar_Widget();
bool openUrl(const KUrl &url);
bool openUrl(const QUrl &url);
void stdAction(const char *handlestd);
KParts::BrowserExtension *getExtension();
virtual QSize sizeHint() const;
public Q_SLOTS:
void addWebSideBar(const KUrl& url, const QString& name);
void addWebSideBar(const QUrl &url, const QString& name);
protected:
void customEvent(QEvent* ev);
......@@ -110,7 +110,7 @@ protected Q_SLOTS:
void slotSetIcon();
void slotRemove();
void slotUrlsDropped(const KUrl::List& urls);
void slotUrlsDropped(const QList<QUrl>& urls);
Q_SIGNALS:
void started(KIO::Job *);
......@@ -120,12 +120,12 @@ Q_SIGNALS:
/* The following public slots are wrappers for browserextension signals */
public Q_SLOTS:
void openUrlRequest( const KUrl &url, const KParts::OpenUrlArguments& args, const KParts::BrowserArguments& browserArgs );
void openUrlRequest( const QUrl &url, const KParts::OpenUrlArguments& args, const KParts::BrowserArguments& browserArgs );
/* @internal
* ### KDE4 remove me
*/
void submitFormRequest(const char*,const QString&,const QByteArray&,const QString&,const QString&,const QString&);
void createNewWindow(const KUrl &url, const KParts::OpenUrlArguments& args, const KParts::BrowserArguments& browserArgs,
void createNewWindow(const QUrl &url, const KParts::OpenUrlArguments& args, const KParts::BrowserArguments& browserArgs,
const KParts::WindowArgs &windowArgs);
void slotEnableAction(KonqSidebarModule* module, const char * name, bool enabled);
......@@ -149,7 +149,7 @@ private:
*/
bool createDirectModule(const QString& templ,
const QString& name,
const KUrl& url,
const QUrl& url,
const QString& icon,
const QString& module,
const QString& treeModule = QString());
......@@ -186,7 +186,7 @@ private:
KConfigGroup *m_config;
QTimer m_configTimer;
KUrl m_storedUrl;
QUrl m_storedUrl;
int m_savedWidth;
int m_latestViewed;
......
......@@ -56,9 +56,9 @@ void KonqSidebarBookmarkItem::del()
//maybe todo
}
KUrl KonqSidebarBookmarkItem::externalURL() const
QUrl KonqSidebarBookmarkItem::externalURL() const
{
return m_bk.isGroup() ? KUrl() : m_bk.url();
return m_bk.isGroup() ? QUrl() : m_bk.url();
}
QString KonqSidebarBookmarkItem::toolTipText() const
......
......@@ -41,7 +41,7 @@ public:
virtual void del();
// The URL to open when this link is clicked
virtual KUrl externalURL() const;
virtual QUrl externalURL() const;
// overwrite this if you want a tooltip shown on your item
virtual QString toolTipText() const;
......
......@@ -125,7 +125,7 @@ void KonqSidebarDirTreeItem::paintCell( QPainter *_painter, const QColorGroup &
Q3ListViewItem::paintCell( _painter, _cg, _column, _width, _alignment );
}
KUrl KonqSidebarDirTreeItem::externalURL() const
QUrl KonqSidebarDirTreeItem::externalURL() const
{
return m_fileItem.url();
}
......@@ -169,7 +169,7 @@ void KonqSidebarDirTreeItem::drop( QDropEvent * ev )
bool KonqSidebarDirTreeItem::populateMimeData( QMimeData* mimeData, bool move )
{
KUrl::List lst;
QList<QUrl> lst;
lst.append( m_fileItem.url() );
kDebug() << lst;
......@@ -182,6 +182,7 @@ void KonqSidebarDirTreeItem::itemSelected()
{
const QMimeData *mimeData = QApplication::clipboard()->mimeData();
const KUrl::List urls = KUrl::List::fromMimeData(mimeData);
const QList<QUrl> urls =
const bool paste = !urls.isEmpty();
tree()->enableActions(true, true, paste);
}
......
......@@ -56,7 +56,7 @@ public:
void rename( const QString & name ); // do the actual renaming
// The URL to open when this link is clicked
virtual KUrl externalURL() const;
virtual QUrl externalURL() const;
virtual QString externalMimeType() const;
virtual QString toolTipText() const;
......
......@@ -412,7 +412,7 @@ static QString findUniqueFilename(const QString &path, const QString &filename)
return path+tempFilename+".desktop";
}