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

List:       kde-commits
Subject:    [ark] /: USe KDEFrameworkCompilerSettings
From:       Laurent Montel <null () kde ! org>
Date:       2018-09-20 12:02:12
Message-ID: E1g2xeu-0004Hw-Tg () code ! kde ! org
[Download RAW message or body]

Git commit d276989c4a271b02c7a98d773aaeebebcbf7efa7 by Laurent Montel.
Committed on 20/09/2018 at 12:01.
Pushed by mlaurent into branch 'master'.

USe KDEFrameworkCompilerSettings

M  +1    -6    CMakeLists.txt
M  +1    -1    app/batchextract.h
M  +1    -1    app/extractHereDndPlugin.h
M  +2    -2    app/mainwindow.h
M  +1    -1    autotests/kerfuffle/extracttest.cpp
M  +2    -2    autotests/kerfuffle/jsonparser.cpp
M  +1    -1    autotests/testhelper/abstractaddtest.cpp
M  +1    -1    autotests/testhelper/testhelper.h
M  +1    -1    kerfuffle/adddialog.h
M  +2    -2    kerfuffle/addtoarchive.h
M  +1    -1    kerfuffle/archive_kerfuffle.h
M  +4    -4    kerfuffle/archiveinterface.h
M  +3    -3    kerfuffle/cliinterface.h
M  +1    -1    kerfuffle/compressionoptionswidget.h
M  +2    -2    kerfuffle/createdialog.h
M  +21   -21   kerfuffle/jobs.h
M  +1    -1    kerfuffle/plugin.h
M  +2    -2    kerfuffle/pluginsettingspage.h
M  +1    -1    kerfuffle/previewsettingspage.h
M  +2    -2    kerfuffle/settingsdialog.h
M  +1    -1    kerfuffle/settingspage.h
M  +2    -2    part/archivemodel.cpp
M  +2    -2    part/archivemodel.h
M  +2    -2    part/archivesortfiltermodel.cpp
M  +2    -2    part/archiveview.h
M  +3    -3    part/jobtracker.h
M  +3    -3    part/part.h
M  +2    -2    plugins/cliunarchiverplugin/cliplugin.h
M  +1    -1    plugins/clizipplugin/cliplugin.h
M  +1    -1    plugins/libarchive/libarchiveplugin.cpp
M  +1    -1    plugins/libarchive/libarchiveplugin.h
M  +2    -2    plugins/libarchive/readwritelibarchiveplugin.cpp
M  +28   -28   plugins/libzipplugin/libzipplugin.cpp

https://commits.kde.org/ark/d276989c4a271b02c7a98d773aaeebebcbf7efa7

diff --git a/CMakeLists.txt b/CMakeLists.txt
index 34d85b75..26440291 100644
--- a/CMakeLists.txt
+++ b/CMakeLists.txt
@@ -15,19 +15,14 @@ set(CMAKE_MODULE_PATH ${ECM_MODULE_PATH} \
${CMAKE_CURRENT_SOURCE_DIR}/cmake/modul  
 include(KDEInstallDirs)
 include(KDECMakeSettings)
-include(KDECompilerSettings NO_POLICY_SCOPE)
+include(KDEFrameworkCompilerSettings NO_POLICY_SCOPE)
 include(GenerateExportHeader)
 include(FeatureSummary)
 include(ECMQtDeclareLoggingCategory)
 include(ECMSetupVersion)
 
-add_definitions(-DQT_NO_CAST_FROM_ASCII
-                -DQT_NO_URL_CAST_FROM_STRING)
-
-add_definitions(-DQT_NO_CAST_TO_ASCII)
 add_definitions(-DQT_NO_NARROWING_CONVERSIONS_IN_CONNECT)
 add_definitions(-DQT_NO_URL_CAST_FROM_STRING)
-add_definitions(-DQT_USE_QSTRINGBUILDER)
 
 ecm_setup_version(PROJECT
                   VARIABLE_PREFIX ARK
diff --git a/app/batchextract.h b/app/batchextract.h
index 09bd34c0..f2e85a22 100644
--- a/app/batchextract.h
+++ b/app/batchextract.h
@@ -181,7 +181,7 @@ public:
      */
     void setPreservePaths(bool value);
 
-private slots:
+private Q_SLOTS:
     /**
      * Updates the percentage of the job that has been completed.
      */
diff --git a/app/extractHereDndPlugin.h b/app/extractHereDndPlugin.h
index 4355ebd9..52285709 100644
--- a/app/extractHereDndPlugin.h
+++ b/app/extractHereDndPlugin.h
@@ -30,7 +30,7 @@ class ExtractHereDndPlugin : public KIO::DndPopupMenuPlugin
 {
     Q_OBJECT
 
-private slots:
+private Q_SLOTS:
     void slotTriggered();
 
 public:
diff --git a/app/mainwindow.h b/app/mainwindow.h
index bf17bf38..b2f382bf 100644
--- a/app/mainwindow.h
+++ b/app/mainwindow.h
@@ -44,14 +44,14 @@ public:
     void dropEvent(class QDropEvent * event) override;
     void dragMoveEvent(class QDragMoveEvent * event) override;
 
-public slots:
+public Q_SLOTS:
     void openUrl(const QUrl &url);
     void setShowExtractDialog(bool);
 
 protected:
     void closeEvent(QCloseEvent *event) override;
 
-private slots:
+private Q_SLOTS:
     void updateActions();
     void newArchive();
     void openArchive();
diff --git a/autotests/kerfuffle/extracttest.cpp \
b/autotests/kerfuffle/extracttest.cpp index 1b88018a..45cdae39 100644
--- a/autotests/kerfuffle/extracttest.cpp
+++ b/autotests/kerfuffle/extracttest.cpp
@@ -487,7 +487,7 @@ void ExtractTest::testPreservePermissions_data()
         const auto mime = QMimeDatabase().mimeTypeForFile(filename, \
                QMimeDatabase::MatchExtension);
         const auto plugins = m_pluginManager.preferredWritePluginsFor(mime);
         foreach (const auto plugin, plugins) {
-            QTest::newRow(QStringLiteral("test preserve 0755 permissions (%1, \
%2)").arg(format, plugin->metaData().pluginId()).toUtf8()) +            \
QTest::newRow(QStringLiteral("test preserve 0755 permissions (%1, %2)").arg(format, \
plugin->metaData().pluginId()).toUtf8().constData())  << filename
                 << plugin
                 << QStringLiteral("0755.sh")
diff --git a/autotests/kerfuffle/jsonparser.cpp b/autotests/kerfuffle/jsonparser.cpp
index 77bff19f..ee6513ac 100644
--- a/autotests/kerfuffle/jsonparser.cpp
+++ b/autotests/kerfuffle/jsonparser.cpp
@@ -67,8 +67,8 @@ JSONParser::JSONArchive JSONParser::createJSONArchive(const \
                QVariant &json)
         QVariantMap::const_iterator entryIterator = entryMap.constBegin();
         for (; entryIterator != entryMap.constEnd(); ++entryIterator) {
             const QByteArray key = entryIterator.key().toUtf8();
-            if (e->property(key).isValid()) {
-                e->setProperty(key, entryIterator.value());
+            if (e->property(key.constData()).isValid()) {
+                e->setProperty(key.constData(), entryIterator.value());
             } else {
                 qDebug() << entryIterator.key() << "is not a valid entry key";
             }
diff --git a/autotests/testhelper/abstractaddtest.cpp \
b/autotests/testhelper/abstractaddtest.cpp index 6afb8c03..ee116d4a 100644
--- a/autotests/testhelper/abstractaddtest.cpp
+++ b/autotests/testhelper/abstractaddtest.cpp
@@ -54,7 +54,7 @@ void AbstractAddTest::setupRows(const QString &testName, const \
QString &archiveN  
         const auto plugins = m_pluginManager.preferredWritePluginsFor(mime);
         foreach (const auto plugin, plugins) {
-            QTest::newRow(QStringLiteral("%1 (%2, %3)").arg(testName, format, \
plugin->metaData().pluginId()).toUtf8()) +            \
QTest::newRow(QStringLiteral("%1 (%2, %3)").arg(testName, format, \
plugin->metaData().pluginId()).toUtf8().constData())  << filename
                 << plugin
                 << targetEntries
diff --git a/autotests/testhelper/testhelper.h b/autotests/testhelper/testhelper.h
index 219b1546..c3e6a876 100644
--- a/autotests/testhelper/testhelper.h
+++ b/autotests/testhelper/testhelper.h
@@ -39,6 +39,6 @@ namespace TestHelper
      * @return List of format extensions (without the leading dot) to be used in \
                tests.
      */
     QStringList testFormats();
-};
+}
 
 #endif //TESTHELPER_H
diff --git a/kerfuffle/adddialog.h b/kerfuffle/adddialog.h
index b19f60f1..858d4539 100644
--- a/kerfuffle/adddialog.h
+++ b/kerfuffle/adddialog.h
@@ -60,7 +60,7 @@ private:
     QMimeType m_mimeType;
     CompressionOptions m_compOptions;
 
-public slots:
+public Q_SLOTS:
     void slotOpenOptions();
 };
 }
diff --git a/kerfuffle/addtoarchive.h b/kerfuffle/addtoarchive.h
index 98c8dfcd..b9c0e0c0 100644
--- a/kerfuffle/addtoarchive.h
+++ b/kerfuffle/addtoarchive.h
@@ -63,7 +63,7 @@ public:
     void setChangeToFirstPath(bool value);
     QString detectBaseName(const QVector<Archive::Entry*> &entries) const;
 
-public slots:
+public Q_SLOTS:
     bool addInput(const QUrl &url);
     void setAutoFilenameSuffix(const QString& suffix);
     void setFilename(const QUrl &path);
@@ -75,7 +75,7 @@ public slots:
 protected:
     bool doKill() override;
 
-private slots:
+private Q_SLOTS:
     void slotFinished(KJob*);
     void slotStartJob();
 
diff --git a/kerfuffle/archive_kerfuffle.h b/kerfuffle/archive_kerfuffle.h
index 94f688fc..578b5ce2 100644
--- a/kerfuffle/archive_kerfuffle.h
+++ b/kerfuffle/archive_kerfuffle.h
@@ -209,7 +209,7 @@ public:
      */
     void encrypt(const QString &password, bool encryptHeader);
 
-private slots:
+private Q_SLOTS:
     void onAddFinished(KJob*);
     void onUserQuery(Kerfuffle::Query*);
     void onCompressionMethodFound(const QString &method);
diff --git a/kerfuffle/archiveinterface.h b/kerfuffle/archiveinterface.h
index 9e50ff61..a46557cf 100644
--- a/kerfuffle/archiveinterface.h
+++ b/kerfuffle/archiveinterface.h
@@ -168,7 +168,7 @@ public:
      */
     virtual bool hasBatchExtractionProgress() const;
 
-signals:
+Q_SIGNALS:
 
     /**
      * Emitted when the user cancels the operation. Examples:
@@ -214,7 +214,7 @@ private:
     bool m_isCorrupt;
     bool m_isMultiVolume;
 
-private slots:
+private Q_SLOTS:
     void onEntry(Archive::Entry *archiveEntry);
 };
 
@@ -246,10 +246,10 @@ public:
     virtual bool deleteFiles(const QVector<Archive::Entry*> &files) = 0;
     virtual bool addComment(const QString &comment) = 0;
 
-signals:
+Q_SIGNALS:
     void entryRemoved(const QString &path);
 
-private slots:
+private Q_SLOTS:
     void onEntryRemoved(const QString &path);
 };
 
diff --git a/kerfuffle/cliinterface.h b/kerfuffle/cliinterface.h
index ed0cb5fc..b4b18111 100644
--- a/kerfuffle/cliinterface.h
+++ b/kerfuffle/cliinterface.h
@@ -154,7 +154,7 @@ protected:
 
     bool m_abortingOperation = false;
 
-protected slots:
+protected Q_SLOTS:
     virtual void readStdout(bool handleAll = false);
 
 private:
@@ -217,10 +217,10 @@ private:
     qulonglong m_archiveSizeOnDisk = 0;
     qulonglong m_listedSize = 0;
 
-protected slots:
+protected Q_SLOTS:
     virtual void processFinished(int exitCode, QProcess::ExitStatus exitStatus);
 
-private slots:
+private Q_SLOTS:
     void extractProcessFinished(int exitCode, QProcess::ExitStatus exitStatus);
     void continueCopying(bool result);
     void onEntry(Archive::Entry *archiveEntry);
diff --git a/kerfuffle/compressionoptionswidget.h \
b/kerfuffle/compressionoptionswidget.h index 699e8a77..67476972 100644
--- a/kerfuffle/compressionoptionswidget.h
+++ b/kerfuffle/compressionoptionswidget.h
@@ -65,7 +65,7 @@ private:
     QMimeType m_mimetype;
     CompressionOptions m_opts;
 
-private slots:
+private Q_SLOTS:
     void slotMultiVolumeChecked(int state);
     void slotCompMethodChanged(const QString &value);
     void slotEncryptionMethodChanged(const QString &value);
diff --git a/kerfuffle/createdialog.h b/kerfuffle/createdialog.h
index 6fd57de0..f2dd6ddb 100644
--- a/kerfuffle/createdialog.h
+++ b/kerfuffle/createdialog.h
@@ -83,7 +83,7 @@ public:
      */
     bool isHeaderEncryptionEnabled() const;
 
-public slots:
+public Q_SLOTS:
     void accept() override;
 
 private:
@@ -95,7 +95,7 @@ private:
     QStringList m_supportedMimeTypes;
     PluginManager m_pluginManger;
 
-private slots:
+private Q_SLOTS:
     void slotFileNameEdited(const QString &text);
     void slotUpdateWidgets(int index);
     void slotUpdateDefaultMimeType();
diff --git a/kerfuffle/jobs.h b/kerfuffle/jobs.h
index 45ad4f58..4e9c98e7 100644
--- a/kerfuffle/jobs.h
+++ b/kerfuffle/jobs.h
@@ -68,10 +68,10 @@ protected:
 
     void connectToArchiveInterfaceSignals();
 
-public slots:
+public Q_SLOTS:
     virtual void doWork() = 0;
 
-protected slots:
+protected Q_SLOTS:
     virtual void onCancelled();
     virtual void onError(const QString &message, const QString &details);
     virtual void onInfo(const QString &info);
@@ -81,7 +81,7 @@ protected slots:
     virtual void onFinished(bool result);
     virtual void onUserQuery(Query *query);
 
-signals:
+Q_SIGNALS:
     void entryRemoved(const QString & entry);
     void newEntry(Archive::Entry*);
     void userQuery(Kerfuffle::Query*);
@@ -125,10 +125,10 @@ public:
     bool isSingleFolderArchive() const;
     QString subfolderName() const;
 
-public slots:
+public Q_SLOTS:
     void doWork() override;
 
-protected slots:
+protected Q_SLOTS:
     void onFinished(bool result) override;
 
 private:
@@ -142,7 +142,7 @@ private:
     qlonglong m_dirCount;
     qlonglong m_filesCount;
 
-private slots:
+private Q_SLOTS:
     void onNewEntry(const Archive::Entry*);
 };
 
@@ -158,13 +158,13 @@ class KERFUFFLE_EXPORT BatchExtractJob : public Job
 public:
     explicit BatchExtractJob(LoadJob *loadJob, const QString &destination, bool \
autoSubfolder, bool preservePaths);  
-public slots:
+public Q_SLOTS:
     void doWork() override;
 
 protected:
     bool doKill() override;
 
-private slots:
+private Q_SLOTS:
     void slotLoadingProgress(double progress);
     void slotExtractProgress(double progress);
     void slotLoadingFinished(KJob *job);
@@ -208,7 +208,7 @@ public:
      */
     void setMultiVolume(bool isMultiVolume);
 
-public slots:
+public Q_SLOTS:
     void doWork() override;
 
 protected:
@@ -230,7 +230,7 @@ public:
     QString destinationDirectory() const;
     ExtractionOptions extractionOptions() const;
 
-public slots:
+public Q_SLOTS:
     void doWork() override;
 
 private:
@@ -266,7 +266,7 @@ public:
      */
     QTemporaryDir *tempDir() const;
 
-public slots:
+public Q_SLOTS:
     void doWork() override;
 
 private:
@@ -316,10 +316,10 @@ class KERFUFFLE_EXPORT AddJob : public Job
 public:
     AddJob(const QVector<Archive::Entry*> &files, const Archive::Entry *destination, \
const CompressionOptions& options, ReadWriteArchiveInterface *interface);  
-public slots:
+public Q_SLOTS:
     void doWork() override;
 
-protected slots:
+protected Q_SLOTS:
     void onFinished(bool result) override;
 
 private:
@@ -340,10 +340,10 @@ Q_OBJECT
 public:
     MoveJob(const QVector<Archive::Entry*> &files, Archive::Entry *destination, \
const CompressionOptions& options, ReadWriteArchiveInterface *interface);  
-public slots:
+public Q_SLOTS:
     void doWork() override;
 
-protected slots:
+protected Q_SLOTS:
     void onFinished(bool result) override;
 
 private:
@@ -364,10 +364,10 @@ Q_OBJECT
 public:
     CopyJob(const QVector<Archive::Entry*> &entries, Archive::Entry *destination, \
const CompressionOptions& options, ReadWriteArchiveInterface *interface);  
-public slots:
+public Q_SLOTS:
     void doWork() override;
 
-protected slots:
+protected Q_SLOTS:
     void onFinished(bool result) override;
 
 private:
@@ -384,7 +384,7 @@ class KERFUFFLE_EXPORT DeleteJob : public Job
 public:
     DeleteJob(const QVector<Archive::Entry*> &files, ReadWriteArchiveInterface \
*interface);  
-public slots:
+public Q_SLOTS:
     void doWork() override;
 
 private:
@@ -398,7 +398,7 @@ class KERFUFFLE_EXPORT CommentJob : public Job
 public:
     CommentJob(const QString& comment, ReadWriteArchiveInterface *interface);
 
-public slots:
+public Q_SLOTS:
     void doWork() override;
 
 private:
@@ -413,10 +413,10 @@ public:
     explicit TestJob(ReadOnlyArchiveInterface *interface);
     bool testSucceeded();
 
-public slots:
+public Q_SLOTS:
     void doWork() override;
 
-private slots:
+private Q_SLOTS:
     virtual void onTestSuccess();
 
 private:
diff --git a/kerfuffle/plugin.h b/kerfuffle/plugin.h
index 4d48ebf3..1460fc1d 100644
--- a/kerfuffle/plugin.h
+++ b/kerfuffle/plugin.h
@@ -98,7 +98,7 @@ public:
      */
     bool isValid() const;
 
-signals:
+Q_SIGNALS:
     void enabledChanged();
 
 private:
diff --git a/kerfuffle/pluginsettingspage.h b/kerfuffle/pluginsettingspage.h
index 94197748..bfd8f466 100644
--- a/kerfuffle/pluginsettingspage.h
+++ b/kerfuffle/pluginsettingspage.h
@@ -43,11 +43,11 @@ class KERFUFFLE_EXPORT PluginSettingsPage : public SettingsPage, \
public Ui::Plug  public:
     explicit PluginSettingsPage(QWidget *parent = nullptr, const QString &name = \
QString(), const QString &iconName = QString());  
-public slots:
+public Q_SLOTS:
     void slotSettingsChanged() override;
     void slotDefaultsButtonClicked() override;
 
-private slots:
+private Q_SLOTS:
     void slotItemChanged(QTreeWidgetItem *item);
 
 private:
diff --git a/kerfuffle/previewsettingspage.h b/kerfuffle/previewsettingspage.h
index 864c873b..3cf4ecec 100644
--- a/kerfuffle/previewsettingspage.h
+++ b/kerfuffle/previewsettingspage.h
@@ -40,7 +40,7 @@ class KERFUFFLE_EXPORT PreviewSettingsPage : public SettingsPage, \
public Ui::Pre  public:
     explicit PreviewSettingsPage(QWidget *parent = nullptr, const QString &name = \
QString(), const QString &iconName = QString());  
-private slots:
+private Q_SLOTS:
     void slotToggled(bool enabled);
 };
 }
diff --git a/kerfuffle/settingsdialog.h b/kerfuffle/settingsdialog.h
index f4de6ac0..fd9e7a4b 100644
--- a/kerfuffle/settingsdialog.h
+++ b/kerfuffle/settingsdialog.h
@@ -45,10 +45,10 @@ class KERFUFFLE_EXPORT SettingsDialog : public KConfigDialog
 public:
     explicit SettingsDialog(QWidget *parent, const QString &name, \
KCoreConfigSkeleton *config);  
-signals:
+Q_SIGNALS:
     void defaultsButtonClicked();
 
-protected slots:
+protected Q_SLOTS:
     void updateWidgetsDefault() override;
 
 };
diff --git a/kerfuffle/settingspage.h b/kerfuffle/settingspage.h
index a6fcfd07..fd153396 100644
--- a/kerfuffle/settingspage.h
+++ b/kerfuffle/settingspage.h
@@ -44,7 +44,7 @@ public:
     QString name() const;
     QString iconName() const;
 
-public slots:
+public Q_SLOTS:
     virtual void slotSettingsChanged();
     virtual void slotDefaultsButtonClicked();
 
diff --git a/part/archivemodel.cpp b/part/archivemodel.cpp
index 9e6a4509..0efba7cf 100644
--- a/part/archivemodel.cpp
+++ b/part/archivemodel.cpp
@@ -122,7 +122,7 @@ QVariant ArchiveModel::data(const QModelIndex &index, int role) \
const  }
 
             default:
-                return entry->property(m_propertiesMap[column]);
+                return entry->property(m_propertiesMap[column].constData());
             }
         }
         case Qt::DecorationRole:
@@ -475,7 +475,7 @@ void ArchiveModel::newEntry(Archive::Entry *receivedEntry, \
InsertBehaviour behav  if (i.key() == Size && size == 0 && compressedSize > 0) {
                 continue;
             }
-            if (!receivedEntry->property(i.value()).toString().isEmpty()) {
+            if (!receivedEntry->property(i.value().constData()).toString().isEmpty()) \
                {
                 if (i.key() != CompressedSize || receivedEntry->compressedSizeIsSet) \
{  toInsert << i.key();
                 }
diff --git a/part/archivemodel.h b/part/archivemodel.h
index 83bc7854..70d21865 100644
--- a/part/archivemodel.h
+++ b/part/archivemodel.h
@@ -138,7 +138,7 @@ public:
     QMap<QString, Kerfuffle::Archive::Entry*> filesToMove;
     QMap<QString, Kerfuffle::Archive::Entry*> filesToCopy;
 
-signals:
+Q_SIGNALS:
     void loadingStarted();
     void loadingFinished(KJob *);
     void extractionFinished(bool success);
@@ -146,7 +146,7 @@ signals:
     void droppedFiles(const QStringList& files, const Archive::Entry*);
     void messageWidget(KMessageWidget::MessageType type, const QString& msg);
 
-private slots:
+private Q_SLOTS:
     void slotNewEntry(Archive::Entry *entry);
     void slotListEntry(Archive::Entry *entry);
     void slotLoadingFinished(KJob *job);
diff --git a/part/archivesortfiltermodel.cpp b/part/archivesortfiltermodel.cpp
index d92fbb1e..2d5a92c1 100644
--- a/part/archivesortfiltermodel.cpp
+++ b/part/archivesortfiltermodel.cpp
@@ -52,12 +52,12 @@ bool ArchiveSortFilterModel::lessThan(const QModelIndex \
&leftIndex,  switch (col) {
         case Size:
         case CompressedSize:
-            if (left->property(property).toULongLong() < \
right->property(property).toULongLong()) { +            if \
(left->property(property.constData()).toULongLong() < \
right->property(property.constData()).toULongLong()) {  return true;
             }
             break;
         default:
-            if (left->property(property).toString() < \
right->property(property).toString()) { +            if \
(left->property(property.constData()).toString() < \
right->property(property.constData()).toString()) {  return true;
             }
         }
diff --git a/part/archiveview.h b/part/archiveview.h
index 974bede3..6f82bcc4 100644
--- a/part/archiveview.h
+++ b/part/archiveview.h
@@ -49,7 +49,7 @@ public:
      */
     void setDropsEnabled(bool enabled);
 
-public slots:
+public Q_SLOTS:
     void renameSelectedEntry();
 
 protected:
@@ -57,7 +57,7 @@ protected:
     void mouseReleaseEvent(QMouseEvent *event) override;
     void keyPressEvent(QKeyEvent *event) override;
 
-signals:
+Q_SIGNALS:
     void entryChanged(const QString &name);
 
 private:
diff --git a/part/jobtracker.h b/part/jobtracker.h
index 87551ce4..5c36e530 100644
--- a/part/jobtracker.h
+++ b/part/jobtracker.h
@@ -46,18 +46,18 @@ public:
 
     QWidget *widget(KJob *) override;
 
-public slots:
+public Q_SLOTS:
     void registerJob(KJob *job) override;
     void unregisterJob(KJob *job) override;
 
-protected slots:
+protected Q_SLOTS:
     void description(KJob *job, const QString &title, const QPair< QString, QString \
>                 &f1, const QPair< QString, QString > &f2)  override;
     void infoMessage(KJob *job, const QString &plain, const QString &rich) override;
     void warning(KJob *job, const QString &plain, const QString &rich) override;
 
     void percent(KJob *job, unsigned long  percent) override;
 
-private slots:
+private Q_SLOTS:
     void resetUi();
 
 private:
diff --git a/part/part.h b/part/part.h
index ab1d0edb..4eb74dad 100644
--- a/part/part.h
+++ b/part/part.h
@@ -93,13 +93,13 @@ public:
      */
     bool confirmAndDelete(const QString& targetFile);
 
-public slots:
+public Q_SLOTS:
     void extractSelectedFilesTo(const QString& localPath);
 
 protected:
     void guiActivateEvent(KParts::GUIActivateEvent *event) override;
 
-private slots:
+private Q_SLOTS:
     void slotCompleted();
     void slotLoadingStarted();
     void slotLoadingFinished(KJob *job);
@@ -164,7 +164,7 @@ private slots:
     void displayMsgWidget(KMessageWidget::MessageType type, const QString& msg);
     void searchEdited(const QString &text);
 
-signals:
+Q_SIGNALS:
     void busy();
     void ready();
     void quit();
diff --git a/plugins/cliunarchiverplugin/cliplugin.h \
b/plugins/cliunarchiverplugin/cliplugin.h index fd304d27..89ebda7d 100644
--- a/plugins/cliunarchiverplugin/cliplugin.h
+++ b/plugins/cliunarchiverplugin/cliplugin.h
@@ -44,14 +44,14 @@ public:
      */
     void setJsonOutput(const QString &jsonOutput);
 
-protected slots:
+protected Q_SLOTS:
     void readStdout(bool handleAll = false) override;
 
 protected:
 
     bool handleLine(const QString& line) override;
 
-private slots:
+private Q_SLOTS:
     void processFinished(int exitCode, QProcess::ExitStatus exitStatus) override;
 
 private:
diff --git a/plugins/clizipplugin/cliplugin.h b/plugins/clizipplugin/cliplugin.h
index 3ab0eea7..5c5325a2 100644
--- a/plugins/clizipplugin/cliplugin.h
+++ b/plugins/clizipplugin/cliplugin.h
@@ -42,7 +42,7 @@ public:
     bool moveFiles(const QVector<Archive::Entry*> &files, Archive::Entry \
*destination, const CompressionOptions& options) override;  int moveRequiredSignals() \
const override;  
-private slots:
+private Q_SLOTS:
     void continueMoving(bool result);
 
 private:
diff --git a/plugins/libarchive/libarchiveplugin.cpp \
b/plugins/libarchive/libarchiveplugin.cpp index 0fc171cc..1d403ab1 100644
--- a/plugins/libarchive/libarchiveplugin.cpp
+++ b/plugins/libarchive/libarchiveplugin.cpp
@@ -422,7 +422,7 @@ bool LibarchivePlugin::initializeReader()
         return false;
     }
 
-    if (archive_read_open_filename(m_archiveReader.data(), \
QFile::encodeName(filename()), 10240) != ARCHIVE_OK) { +    if \
(archive_read_open_filename(m_archiveReader.data(), \
                QFile::encodeName(filename()).constData(), 10240) != ARCHIVE_OK) {
         qCWarning(ARK) << "Could not open the archive:" << \
                archive_error_string(m_archiveReader.data());
         emit error(i18nc("@info", "Archive corrupted or insufficient \
permissions."));  return false;
diff --git a/plugins/libarchive/libarchiveplugin.h \
b/plugins/libarchive/libarchiveplugin.h index a5de144b..2d3f7077 100644
--- a/plugins/libarchive/libarchiveplugin.h
+++ b/plugins/libarchive/libarchiveplugin.h
@@ -88,7 +88,7 @@ protected:
     ArchiveRead m_archiveReader;
     ArchiveRead m_archiveReadDisk;
 
-private slots:
+private Q_SLOTS:
     void slotRestoreWorkingDir();
 
 private:
diff --git a/plugins/libarchive/readwritelibarchiveplugin.cpp \
b/plugins/libarchive/readwritelibarchiveplugin.cpp index b60456bc..362bbf9a 100644
--- a/plugins/libarchive/readwritelibarchiveplugin.cpp
+++ b/plugins/libarchive/readwritelibarchiveplugin.cpp
@@ -365,7 +365,7 @@ bool \
ReadWriteLibarchivePlugin::initializeNewFileWriterFilters(const Compression  // Set \
compression level if passed in CompressionOptions.  if \
                (options.isCompressionLevelSet()) {
         qCDebug(ARK) << "Using compression level:" << options.compressionLevel();
-        ret = archive_write_set_filter_option(m_archiveWriter.data(), nullptr, \
"compression-level", QString::number(options.compressionLevel()).toUtf8()); +        \
ret = archive_write_set_filter_option(m_archiveWriter.data(), nullptr, \
"compression-level", \
QString::number(options.compressionLevel()).toUtf8().constData());  if (ret != \
                ARCHIVE_OK) {
             qCWarning(ARK) << "Failed to set compression level" << \
                archive_error_string(m_archiveWriter.data());
             emit error(i18nc("@info", "Could not set the compression level."));
@@ -425,7 +425,7 @@ bool ReadWriteLibarchivePlugin::processOldEntries(uint \
&entriesCounter, Operatio  iteratedEntries--;
 
                 // Change entry path.
-                archive_entry_set_pathname(entry, newPathname.toUtf8());
+                archive_entry_set_pathname(entry, newPathname.toUtf8().constData());
                 emitEntryFromArchiveEntry(entry);
             }
         } else if (m_filesPaths.contains(file)) {
diff --git a/plugins/libzipplugin/libzipplugin.cpp \
b/plugins/libzipplugin/libzipplugin.cpp index 6122392b..b89a4981 100644
--- a/plugins/libzipplugin/libzipplugin.cpp
+++ b/plugins/libzipplugin/libzipplugin.cpp
@@ -86,7 +86,7 @@ bool LibzipPlugin::list()
     zip_error_t err;
 
     // Open archive.
-    zip_t *archive = zip_open(QFile::encodeName(filename()), ZIP_RDONLY, &errcode);
+    zip_t *archive = zip_open(QFile::encodeName(filename()).constData(), ZIP_RDONLY, \
&errcode);  zip_error_init_with_code(&err, errcode);
     if (!archive) {
         qCCritical(ARK) << "Failed to open archive. Code:" << errcode;
@@ -130,7 +130,7 @@ bool LibzipPlugin::addFiles(const QVector<Archive::Entry*> \
&files, const Archive  zip_error_t err;
 
     // Open archive.
-    zip_t *archive = zip_open(QFile::encodeName(filename()), ZIP_CREATE, &errcode);
+    zip_t *archive = zip_open(QFile::encodeName(filename()).constData(), ZIP_CREATE, \
&errcode);  zip_error_init_with_code(&err, errcode);
     if (!archive) {
         qCCritical(ARK) << "Failed to open archive. Code:" << errcode;
@@ -219,7 +219,7 @@ bool LibzipPlugin::writeEntry(zip_t *archive, const QString \
&file, const Archive  
     qlonglong index;
     if (isDir) {
-        index = zip_dir_add(archive, destFile, ZIP_FL_ENC_GUESS);
+        index = zip_dir_add(archive, destFile.constData(), ZIP_FL_ENC_GUESS);
         if (index == -1) {
             // If directory already exists in archive, we get an error.
             qCWarning(ARK) << "Failed to add dir " << file << ":" << \
zip_strerror(archive); @@ -229,7 +229,7 @@ bool LibzipPlugin::writeEntry(zip_t \
                *archive, const QString &file, const Archive
         zip_source_t *src = zip_source_file(archive, \
QFile::encodeName(file).constData(), 0, -1);  Q_ASSERT(src);
 
-        index = zip_file_add(archive, destFile, src, ZIP_FL_ENC_GUESS | \
ZIP_FL_OVERWRITE); +        index = zip_file_add(archive, destFile.constData(), src, \
ZIP_FL_ENC_GUESS | ZIP_FL_OVERWRITE);  if (index == -1) {
             zip_source_free(src);
             qCCritical(ARK) << "Could not add entry" << file << ":" << \
zip_strerror(archive); @@ -241,7 +241,7 @@ bool LibzipPlugin::writeEntry(zip_t \
*archive, const QString &file, const Archive  #ifndef Q_OS_WIN
     // Set permissions.
     QT_STATBUF result;
-    if (QT_STAT(QFile::encodeName(file), &result) != 0) {
+    if (QT_STAT(QFile::encodeName(file).constData(), &result) != 0) {
         qCWarning(ARK) << "Failed to read permissions for:" << file;
     } else {
         zip_uint32_t attributes = result.st_mode << 16;
@@ -254,11 +254,11 @@ bool LibzipPlugin::writeEntry(zip_t *archive, const QString \
&file, const Archive  if (!password().isEmpty()) {
         Q_ASSERT(!options.encryptionMethod().isEmpty());
         if (options.encryptionMethod() == QLatin1String("AES128")) {
-            zip_file_set_encryption(archive, index, ZIP_EM_AES_128, \
password().toUtf8()); +            zip_file_set_encryption(archive, index, \
                ZIP_EM_AES_128, password().toUtf8().constData());
         } else if (options.encryptionMethod() == QLatin1String("AES192")) {
-            zip_file_set_encryption(archive, index, ZIP_EM_AES_192, \
password().toUtf8()); +            zip_file_set_encryption(archive, index, \
                ZIP_EM_AES_192, password().toUtf8().constData());
         } else if (options.encryptionMethod() == QLatin1String("AES256")) {
-            zip_file_set_encryption(archive, index, ZIP_EM_AES_256, \
password().toUtf8()); +            zip_file_set_encryption(archive, index, \
ZIP_EM_AES_256, password().toUtf8().constData());  }
     }
 
@@ -397,7 +397,7 @@ bool LibzipPlugin::deleteFiles(const QVector<Archive::Entry*> \
&files)  zip_error_t err;
 
     // Open archive.
-    zip_t *archive = zip_open(QFile::encodeName(filename()), 0, &errcode);
+    zip_t *archive = zip_open(QFile::encodeName(filename()).constData(), 0, \
&errcode);  zip_error_init_with_code(&err, errcode);
     if (archive == nullptr) {
         qCCritical(ARK) << "Failed to open archive. Code:" << errcode;
@@ -412,7 +412,7 @@ bool LibzipPlugin::deleteFiles(const QVector<Archive::Entry*> \
&files)  break;
         }
 
-        const qlonglong index = zip_name_locate(archive, e->fullPath().toUtf8(), \
ZIP_FL_ENC_GUESS); +        const qlonglong index = zip_name_locate(archive, \
e->fullPath().toUtf8().constData(), ZIP_FL_ENC_GUESS);  if (index == -1) {
             qCCritical(ARK) << "Could not find entry to delete:" << e->fullPath();
             emit error(xi18n("Failed to delete entry: %1", e->fullPath()));
@@ -443,7 +443,7 @@ bool LibzipPlugin::addComment(const QString& comment)
     zip_error_t err;
 
     // Open archive.
-    zip_t *archive = zip_open(QFile::encodeName(filename()), 0, &errcode);
+    zip_t *archive = zip_open(QFile::encodeName(filename()).constData(), 0, \
&errcode);  zip_error_init_with_code(&err, errcode);
     if (archive == nullptr) {
         qCCritical(ARK) << "Failed to open archive. Code:" << errcode;
@@ -452,7 +452,7 @@ bool LibzipPlugin::addComment(const QString& comment)
     }
 
     // Set archive comment.
-    if (zip_set_archive_comment(archive, comment.toUtf8(), comment.length())) {
+    if (zip_set_archive_comment(archive, comment.toUtf8().constData(), \
                comment.length())) {
         qCCritical(ARK) << "Failed to set comment:" << zip_strerror(archive);
         return false;
     }
@@ -473,7 +473,7 @@ bool LibzipPlugin::testArchive()
     zip_error_t err;
 
     // Open archive performing extra consistency checks.
-    zip_t *archive = zip_open(QFile::encodeName(filename()), ZIP_CHECKCONS, \
&errcode); +    zip_t *archive = zip_open(QFile::encodeName(filename()).constData(), \
ZIP_CHECKCONS, &errcode);  zip_error_init_with_code(&err, errcode);
     if (archive == nullptr) {
         qCCritical(ARK) << "Failed to open archive:" << zip_error_strerror(&err);
@@ -543,7 +543,7 @@ bool LibzipPlugin::extractFiles(const QVector<Archive::Entry*> \
&files, const QSt  zip_error_t err;
 
     // Open archive.
-    zip_t *archive = zip_open(QFile::encodeName(filename()), ZIP_RDONLY, &errcode);
+    zip_t *archive = zip_open(QFile::encodeName(filename()).constData(), ZIP_RDONLY, \
&errcode);  zip_error_init_with_code(&err, errcode);
     if (archive == nullptr) {
         qCCritical(ARK) << "Failed to open archive. Code:" << errcode;
@@ -554,7 +554,7 @@ bool LibzipPlugin::extractFiles(const QVector<Archive::Entry*> \
&files, const QSt  // Set password if known.
     if (!password().isEmpty()) {
         qCDebug(ARK) << "Password already known. Setting...";
-        zip_set_default_password(archive, password().toUtf8());
+        zip_set_default_password(archive, password().toUtf8().constData());
     }
 
     // Get number of archive entries.
@@ -658,7 +658,7 @@ bool LibzipPlugin::extractEntry(zip_t *archive, const QString \
&entry, const QStr  
     // Get statistic for entry. Used to get entry size and mtime.
     zip_stat_t statBuffer;
-    if (zip_stat(archive, entry.toUtf8(), 0, &statBuffer) != 0) {
+    if (zip_stat(archive, entry.toUtf8().constData(), 0, &statBuffer) != 0) {
         if (isDirectory && zip_error_code_zip(zip_get_error(archive)) == \
ZIP_ER_NOENT) {  qCWarning(ARK) << "Skipping folder without entry:" << entry;
             return true;
@@ -704,7 +704,7 @@ bool LibzipPlugin::extractEntry(zip_t *archive, const QString \
&entry, const QStr  zip_file *zipFile = nullptr;
         bool firstTry = true;
         while (!zipFile) {
-            zipFile = zip_fopen(archive, entry.toUtf8(), 0);
+            zipFile = zip_fopen(archive, entry.toUtf8().constData(), 0);
             if (zipFile) {
                 break;
             } else if (zip_error_code_zip(zip_get_error(archive)) == ZIP_ER_NOPASSWD \
|| @@ -719,7 +719,7 @@ bool LibzipPlugin::extractEntry(zip_t *archive, const QString \
&entry, const QStr  }
                 setPassword(query.password());
 
-                if (zip_set_default_password(archive, password().toUtf8())) {
+                if (zip_set_default_password(archive, \
                password().toUtf8().constData())) {
                     qCDebug(ARK) << "Failed to set password for:" << entry;
                 }
                 firstTry = false;
@@ -758,7 +758,7 @@ bool LibzipPlugin::extractEntry(zip_t *archive, const QString \
&entry, const QStr  sum += readBytes;
         }
 
-        const auto index = zip_name_locate(archive, entry.toUtf8(), \
ZIP_FL_ENC_GUESS); +        const auto index = zip_name_locate(archive, \
entry.toUtf8().constData(), ZIP_FL_ENC_GUESS);  if (index == -1) {
             qCCritical(ARK) << "Could not locate entry:" << entry;
             emit error(xi18n("Failed to locate entry: %1", entry));
@@ -789,14 +789,14 @@ bool LibzipPlugin::extractEntry(zip_t *archive, const QString \
&entry, const QStr  // Set mtime for entry.
     utimbuf times;
     times.modtime = statBuffer.mtime;
-    if (utime(destination.toUtf8(), &times) != 0) {
+    if (utime(destination.toUtf8().constData(), &times) != 0) {
         qCWarning(ARK) << "Failed to restore mtime:" << destination;
     }
 
     if (restoreParentMtime) {
         // Restore mtime for parent dir.
         times.modtime = parent_mtime;
-        if (utime(parentDir.toUtf8(), &times) != 0) {
+        if (utime(parentDir.toUtf8().constData(), &times) != 0) {
             qCWarning(ARK) << "Failed to restore mtime for parent dir of:" << \
destination;  }
     }
@@ -812,7 +812,7 @@ bool LibzipPlugin::moveFiles(const QVector<Archive::Entry*> \
&files, Archive::Ent  zip_error_t err;
 
     // Open archive.
-    zip_t *archive = zip_open(QFile::encodeName(filename()), 0, &errcode);
+    zip_t *archive = zip_open(QFile::encodeName(filename()).constData(), 0, \
&errcode);  zip_error_init_with_code(&err, errcode);
     if (archive == nullptr) {
         qCCritical(ARK) << "Failed to open archive. Code:" << errcode;
@@ -827,14 +827,14 @@ bool LibzipPlugin::moveFiles(const QVector<Archive::Entry*> \
&files, Archive::Ent  int i;
     for (i = 0; i < filePaths.size(); ++i) {
 
-        const int index = zip_name_locate(archive, filePaths.at(i).toUtf8(), \
ZIP_FL_ENC_GUESS); +        const int index = zip_name_locate(archive, \
filePaths.at(i).toUtf8().constData(), ZIP_FL_ENC_GUESS);  if (index == -1) {
             qCCritical(ARK) << "Could not find entry to move:" << filePaths.at(i);
             emit error(xi18n("Failed to move entry: %1", filePaths.at(i)));
             return false;
         }
 
-        if (zip_file_rename(archive, index, destPaths.at(i).toUtf8(), \
ZIP_FL_ENC_GUESS) == -1) { +        if (zip_file_rename(archive, index, \
                destPaths.at(i).toUtf8().constData(), ZIP_FL_ENC_GUESS) == -1) {
             qCCritical(ARK) << "Could not move entry:" << filePaths.at(i);
             emit error(xi18n("Failed to move entry: %1", filePaths.at(i)));
             return false;
@@ -862,7 +862,7 @@ bool LibzipPlugin::copyFiles(const QVector<Archive::Entry*> \
&files, Archive::Ent  zip_error_t err;
 
     // Open archive.
-    zip_t *archive = zip_open(QFile::encodeName(filename()), 0, &errcode);
+    zip_t *archive = zip_open(QFile::encodeName(filename()).constData(), 0, \
&errcode);  zip_error_init_with_code(&err, errcode);
     if (archive == nullptr) {
         qCCritical(ARK) << "Failed to open archive. Code:" << errcode;
@@ -879,14 +879,14 @@ bool LibzipPlugin::copyFiles(const QVector<Archive::Entry*> \
&files, Archive::Ent  QString dest = destPaths.at(i);
 
         if (dest.endsWith(QDir::separator())) {
-            if (zip_dir_add(archive, dest.toUtf8(), ZIP_FL_ENC_GUESS) == -1) {
+            if (zip_dir_add(archive, dest.toUtf8().constData(), ZIP_FL_ENC_GUESS) == \
                -1) {
                 // If directory already exists in archive, we get an error.
                 qCWarning(ARK) << "Failed to add dir " << dest << ":" << \
zip_strerror(archive);  continue;
             }
         }
 
-        const int srcIndex = zip_name_locate(archive, filePaths.at(i).toUtf8(), \
ZIP_FL_ENC_GUESS); +        const int srcIndex = zip_name_locate(archive, \
filePaths.at(i).toUtf8().constData(), ZIP_FL_ENC_GUESS);  if (srcIndex == -1) {
             qCCritical(ARK) << "Could not find entry to copy:" << filePaths.at(i);
             emit error(xi18n("Failed to copy entry: %1", filePaths.at(i)));
@@ -899,7 +899,7 @@ bool LibzipPlugin::copyFiles(const QVector<Archive::Entry*> \
&files, Archive::Ent  return false;
         }
 
-        const int destIndex = zip_file_add(archive, dest.toUtf8(), src, \
ZIP_FL_ENC_GUESS | ZIP_FL_OVERWRITE); +        const int destIndex = \
zip_file_add(archive, dest.toUtf8().constData(), src, ZIP_FL_ENC_GUESS | \
ZIP_FL_OVERWRITE);  if (destIndex == -1) {
             zip_source_free(src);
             qCCritical(ARK) << "Could not add entry" << dest << ":" << \
zip_strerror(archive);


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

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