[prev in list] [next in list] [prev in thread] [next in thread] 

List:       kde-commits
Subject:    [kde-baseapps] konqueror: Continue to port to kf5
From:       Montel Laurent <montel () kde ! org>
Date:       2016-10-31 19:36:47
Message-ID: E1c1INz-0007TE-Mz () code ! kde ! org
[Download RAW message or body]

Git commit 1a9583d902b1ce21d76470e40949635f7a1a28a1 by Montel Laurent.
Committed on 31/10/2016 at 19:36.
Pushed by mlaurent into branch 'master'.

Continue to port to kf5

M  +0    -1    konqueror/client/kfmclient.cpp
M  +2    -2    konqueror/plugins/kimgalleryplugin/imgallerydialog.cpp
M  +13   -13   konqueror/plugins/rellinks/plugin_rellinks.cpp
M  +1    -1    konqueror/plugins/searchbar/OpenSearchManager.cpp
M  +8    -6    konqueror/plugins/searchbar/WebShortcutWidget.cpp

http://commits.kde.org/kde-baseapps/1a9583d902b1ce21d76470e40949635f7a1a28a1

diff --git a/konqueror/client/kfmclient.cpp b/konqueror/client/kfmclient.cpp
index 8b7a2db..cba818a 100644
--- a/konqueror/client/kfmclient.cpp
+++ b/konqueror/client/kfmclient.cpp
@@ -48,7 +48,6 @@
 
 #include <QDir>
 #include <QMimeDatabase>
-#include <QRegExp>
 #include <QUrl>
 #include <QStandardPaths>
 
diff --git a/konqueror/plugins/kimgalleryplugin/imgallerydialog.cpp \
b/konqueror/plugins/kimgalleryplugin/imgallerydialog.cpp index 78002f2..181a9cc \
                100644
--- a/konqueror/plugins/kimgalleryplugin/imgallerydialog.cpp
+++ b/konqueror/plugins/kimgalleryplugin/imgallerydialog.cpp
@@ -73,8 +73,8 @@ void KIGPDialog::slotDefault()
     m_imageProperty->setChecked(false);
     m_fontName->setItemText(m_fontName->currentIndex(), \
QFontDatabase::systemFont(QFontDatabase::GeneralFont).family());  \
                m_fontSize->setValue(14);
-    m_foregroundColor->setColor(QColor("#d0ffd0"));
-    m_backgroundColor->setColor(QColor("#333333"));
+    m_foregroundColor->setColor(QColor(QStringLiteral("#d0ffd0")));
+    m_backgroundColor->setColor(QColor(QStringLiteral("#333333")));
 
     m_imageNameReq->setUrl(QUrl::fromLocalFile(m_path + "images.html"));
     m_recurseSubDir->setChecked(false);
diff --git a/konqueror/plugins/rellinks/plugin_rellinks.cpp \
b/konqueror/plugins/rellinks/plugin_rellinks.cpp index 80f5134..4384d32 100644
--- a/konqueror/plugins/rellinks/plugin_rellinks.cpp
+++ b/konqueror/plugins/rellinks/plugin_rellinks.cpp
@@ -72,14 +72,14 @@ RelLinksPlugin::RelLinksPlugin(QObject *parent, const \
QVariantList &)  a =  actionCollection()->addAction(QStringLiteral("rellinks_home"));
     a->setText(i18n("&Top"));
     a->setIcon(QIcon::fromTheme(QStringLiteral("go-top")));
-    a->setShortcut(QKeySequence(QStringLiteral("Ctrl+Alt+T")));
+    actionCollection()->setDefaultShortcut(a, \
                QKeySequence(QStringLiteral("Ctrl+Alt+T")));
     a->setWhatsThis(i18n("<p>This link references a home page or the top of some \
hierarchy.</p>"));  grp->addAction(a);
 
     a = actionCollection()->addAction(QStringLiteral("rellinks_up"));
     a->setText(i18n("&Up"));
     a->setIcon(QIcon::fromTheme(QStringLiteral("go-up")));
-    a->setShortcut(QKeySequence(QStringLiteral("Ctrl+Alt+U")));
+    actionCollection()->setDefaultShortcut(a, \
                QKeySequence(QStringLiteral("Ctrl+Alt+U")));
     a->setWhatsThis(i18n("<p>This link references the immediate parent of the \
current document.</p>"));  grp->addAction(a);
 
@@ -88,28 +88,28 @@ RelLinksPlugin::RelLinksPlugin(QObject *parent, const \
QVariantList &)  a = actionCollection()->addAction(QStringLiteral("rellinks_begin"));
     a->setText(i18n("&First"));
     a->setIcon(QIcon::fromTheme(isRTL ? "go-last" : "go-first"));
-    a->setShortcut(QKeySequence(QStringLiteral("Ctrl+Alt+F")));
+    actionCollection()->setDefaultShortcut(a, \
                QKeySequence(QStringLiteral("Ctrl+Alt+F")));
     a->setWhatsThis(i18n("<p>This link type tells search engines which document is \
considered by the author to be the starting point of the collection.</p>"));  \
grp->addAction(a);  
     a = actionCollection()->addAction(QStringLiteral("rellinks_prev"));
     a->setText(i18n("&Previous"));
     a->setIcon(QIcon::fromTheme(isRTL ? "go-next" : "go-previous"));
-    a->setShortcut(QKeySequence(QStringLiteral("Ctrl+Alt+P")));
+    actionCollection()->setDefaultShortcut(a, \
                QKeySequence(QStringLiteral("Ctrl+Alt+P")));
     a->setWhatsThis(i18n("<p>This link references the previous document in an \
ordered series of documents.</p>"));  grp->addAction(a);
 
     a = actionCollection()->addAction(QStringLiteral("rellinks_next"));
     a->setText(i18n("&Next"));
     a->setIcon(QIcon::fromTheme(isRTL ? "go-previous" : "go-next"));
-    a->setShortcut(QKeySequence(QStringLiteral("Ctrl+Alt+N")));
+    actionCollection()->setDefaultShortcut(a, \
                QKeySequence(QStringLiteral("Ctrl+Alt+N")));
     a->setWhatsThis(i18n("<p>This link references the next document in an ordered \
series of documents.</p>"));  grp->addAction(a);
 
     a = actionCollection()->addAction(QStringLiteral("rellinks_last"));
     a->setText(i18n("&Last"));
     a->setIcon(QIcon::fromTheme(isRTL ? "go-first" : "go-last"));
-    a->setShortcut(QKeySequence(QStringLiteral("Ctrl+Alt+L")));
+    actionCollection()->setDefaultShortcut(a, \
                QKeySequence(QStringLiteral("Ctrl+Alt+L")));
     a->setWhatsThis(i18n("<p>This link references the end of a sequence of \
documents.</p>"));  grp->addAction(a);
 
@@ -117,7 +117,7 @@ RelLinksPlugin::RelLinksPlugin(QObject *parent, const \
QVariantList &)  a = \
actionCollection()->addAction(QStringLiteral("rellinks_search"));  \
a->setText(i18n("&Search"));  \
                a->setIcon(QIcon::fromTheme(QStringLiteral("edit-find")));
-    a->setShortcut(QKeySequence(QStringLiteral("Ctrl+Alt+S")));
+    actionCollection()->setDefaultShortcut(a, \
QKeySequence(QStringLiteral("Ctrl+Alt+S")));  a->setWhatsThis(i18n("<p>This link \
references the search.</p>"));  grp->addAction(a);
 
@@ -129,7 +129,7 @@ RelLinksPlugin::RelLinksPlugin(QObject *parent, const \
QVariantList &)  
     a = actionCollection()->addAction(QStringLiteral("rellinks_contents"));
     a->setText(i18n("Table of &Contents"));
-    a->setShortcut(QKeySequence(QStringLiteral("Ctrl+Alt+C")));
+    actionCollection()->setDefaultShortcut(a, \
                QKeySequence(QStringLiteral("Ctrl+Alt+C")));
     a->setWhatsThis(i18n("<p>This link references the table of contents.</p>"));
     m_document->addAction(a);
     grp->addAction(a);
@@ -176,7 +176,7 @@ RelLinksPlugin::RelLinksPlugin(QObject *parent, const \
QVariantList &)  
     a = actionCollection()->addAction(QStringLiteral("rellinks_index"));
     a->setText(i18n("&Index"));
-    a->setShortcut(QKeySequence(QStringLiteral("Ctrl+Alt+I")));
+    actionCollection()->setDefaultShortcut(a, \
QKeySequence(QStringLiteral("Ctrl+Alt+I")));  a->setWhatsThis(i18n("<p>This link \
references the index.</p>"));  m_document->addAction(a);
     grp->addAction(a);
@@ -190,7 +190,7 @@ RelLinksPlugin::RelLinksPlugin(QObject *parent, const \
QVariantList &)  a = actionCollection()->addAction(QStringLiteral("rellinks_help"));
     a->setText(i18n("&Help"));
     a->setIcon(QIcon::fromTheme(QStringLiteral("help-contents")));
-    a->setShortcut(QKeySequence(QStringLiteral("Ctrl+Alt+H")));
+    actionCollection()->setDefaultShortcut(a, \
QKeySequence(QStringLiteral("Ctrl+Alt+H")));  a->setWhatsThis(i18n("<p>This link \
references the help.</p>"));  m_more->addAction(a);
     grp->addAction(a);
@@ -198,7 +198,7 @@ RelLinksPlugin::RelLinksPlugin(QObject *parent, const \
QVariantList &)  a = \
actionCollection()->addAction(QStringLiteral("rellinks_author"));  \
a->setText(i18n("&Authors"));  \
                a->setIcon(QIcon::fromTheme(QStringLiteral("x-office-contact")));
-    a->setShortcut(QKeySequence(QStringLiteral("Ctrl+Alt+A")));
+    actionCollection()->setDefaultShortcut(a, \
QKeySequence(QStringLiteral("Ctrl+Alt+A")));  a->setWhatsThis(i18n("<p>This link \
references the author.</p>"));  m_more->addAction(a);
     grp->addAction(a);
@@ -206,7 +206,7 @@ RelLinksPlugin::RelLinksPlugin(QObject *parent, const \
                QVariantList &)
     a = actionCollection()->addAction(QStringLiteral("rellinks_copyright"));
     a->setText(i18n("Copy&right"));
     a->setIcon(QIcon::fromTheme(QStringLiteral("help-about")));
-    a->setShortcut(QKeySequence(QStringLiteral("Ctrl+Alt+R")));
+    actionCollection()->setDefaultShortcut(a, \
QKeySequence(QStringLiteral("Ctrl+Alt+R")));  a->setWhatsThis(i18n("<p>This link \
references the copyright.</p>"));  m_more->addAction(a);
     grp->addAction(a);
@@ -248,7 +248,7 @@ RelLinksPlugin::RelLinksPlugin(QObject *parent, const \
QVariantList &)  // create polling timer and connect it
     m_pollTimer = new QTimer(this);
     m_pollTimer->setObjectName(QStringLiteral("polling timer"));
-    connect(m_pollTimer, SIGNAL(timeout()), this, SLOT(updateToolbar()));
+    connect(m_pollTimer, &QTimer::timeout, this, &RelLinksPlugin::updateToolbar);
 
     // delay access to our part's members until it has finished its initialisation
     QTimer::singleShot(0, this, SLOT(delayedSetup()));
diff --git a/konqueror/plugins/searchbar/OpenSearchManager.cpp \
b/konqueror/plugins/searchbar/OpenSearchManager.cpp index d962108..168bdb7 100644
--- a/konqueror/plugins/searchbar/OpenSearchManager.cpp
+++ b/konqueror/plugins/searchbar/OpenSearchManager.cpp
@@ -33,7 +33,7 @@
 
 OpenSearchManager::OpenSearchManager(QObject *parent)
     : QObject(parent)
-    , m_activeEngine(0)
+    , m_activeEngine(Q_NULLPTR)
 {
     m_state = IDLE;
 }
diff --git a/konqueror/plugins/searchbar/WebShortcutWidget.cpp \
b/konqueror/plugins/searchbar/WebShortcutWidget.cpp index 12ac3e0..a1dfe36 100644
--- a/konqueror/plugins/searchbar/WebShortcutWidget.cpp
+++ b/konqueror/plugins/searchbar/WebShortcutWidget.cpp
@@ -28,13 +28,15 @@
 
 #include <KGlobalSettings>
 
+#include <KGuiItem>
 #include <KLocale>
+#include <KStandardGuiItem>
 #include <QFontDatabase>
 
 WebShortcutWidget::WebShortcutWidget(QWidget *parent)
     : QDialog(parent)
 {
-    QVBoxLayout *mainLayout = new QVBoxLayout();
+    QVBoxLayout *mainLayout = new QVBoxLayout(this);
     QHBoxLayout *titleLayout = new QHBoxLayout();
     mainLayout->addLayout(titleLayout);
     QLabel *iconLabel = new QLabel(this);
@@ -69,16 +71,16 @@ WebShortcutWidget::WebShortcutWidget(QWidget *parent)
     QHBoxLayout *buttonLayout = new QHBoxLayout();
     mainLayout->addLayout(buttonLayout);
     buttonLayout->addStretch();
-    QPushButton *okButton = new QPushButton(i18n("OK"), this);
+    QPushButton *okButton = new QPushButton(this);
+    KGuiItem::assign(okButton, KStandardGuiItem::ok());
     okButton->setDefault(true);
     buttonLayout->addWidget(okButton);
-    connect(okButton, SIGNAL(clicked()), this, SLOT(okClicked()));
+    connect(okButton, &QAbstractButton::clicked, this, \
&WebShortcutWidget::okClicked);  
     QPushButton *cancelButton = new QPushButton(i18n("Cancel"), this);
+    KGuiItem::assign(cancelButton, KStandardGuiItem::cancel());
     buttonLayout->addWidget(cancelButton);
-    connect(cancelButton, SIGNAL(clicked()), this, SLOT(cancelClicked()));
-
-    setLayout(mainLayout);
+    connect(cancelButton, &QAbstractButton::clicked, this, \
&WebShortcutWidget::cancelClicked);  
     resize(minimumSizeHint());
 


[prev in list] [next in list] [prev in thread] [next in thread] 

Configure | About | News | Add a list | Sponsored by KoreLogic