Members of the KDE Community are recommended to subscribe to the kde-community mailing list at https://mail.kde.org/mailman/listinfo/kde-community to allow them to participate in important discussions and receive other important announcements

Commit d13c040b authored by Laurent Montel's avatar Laurent Montel 😁

Use KDEFrameworkCompilerSettings

parent cde1c663
......@@ -16,7 +16,7 @@ find_package(KF5 ${KF5_MIN_VERSION} REQUIRED COMPONENTS CoreAddons I18n Declarat
include(FeatureSummary)
include(KDEInstallDirs)
include(KDECMakeSettings)
include(KDECompilerSettings NO_POLICY_SCOPE)
include(KDEFrameworkCompilerSettings NO_POLICY_SCOPE)
include(ECMAddTests)
include(GenerateExportHeader)
......
......@@ -46,7 +46,7 @@ Preview::Preview(QQuickItem* parent)
connect(plugin, SIGNAL(previewGenerated(QQuickItem*)),
this, SLOT(slotPreviewGenerated(QQuickItem*)));
if (plugin->mimetypes().contains("file"))
if (plugin->mimetypes().contains(QStringLiteral("file")))
m_filePlugin = plugin;
}
......@@ -160,7 +160,7 @@ QString Preview::highlight() const
QList<PreviewPlugin*> Preview::allPlugins()
{
KService::List serviceList = KServiceTypeTrader::self()->query("MilouPreviewPlugin");
KService::List serviceList = KServiceTypeTrader::self()->query(QStringLiteral("MilouPreviewPlugin"));
QList<PreviewPlugin*> plugins;
KService::List::const_iterator it;
......
......@@ -53,14 +53,14 @@ public:
bool loaded() const { return m_loaded; }
signals:
Q_SIGNALS:
void loadingFinished();
public slots:
public Q_SLOTS:
void refresh();
void clear();
private slots:
private Q_SLOTS:
void slotPreviewGenerated(QQuickItem* item);
void setPluginContexts();
......
......@@ -81,7 +81,7 @@ QQmlContext* PreviewPlugin::context()
void PreviewPlugin::highlight(const QTextDocument* doc) const
{
QTextCursor cursor;
Q_FOREACH (const QString& text, highlight().split(' ', QString::SkipEmptyParts)) {
Q_FOREACH (const QString& text, highlight().split(QLatin1Char(' '), QString::SkipEmptyParts)) {
while (1) {
cursor = doc->find(text, cursor);
if (cursor.isNull())
......
......@@ -81,7 +81,7 @@ public:
QString highlight() const;
void setHighlight(const QString& term);
signals:
Q_SIGNALS:
void previewGenerated(QQuickItem* graphicsItem);
protected:
......
......@@ -37,7 +37,7 @@ public:
return QStringList() << QLatin1String("audio/");
}
private slots:
private Q_SLOTS:
void slotFileReceived(const Baloo::File& file);
};
......
......@@ -36,7 +36,7 @@ public:
return QStringList() << QLatin1String("html");
}
private slots:
private Q_SLOTS:
};
#endif // BOOKMARKPLUGIN_H
......@@ -37,7 +37,7 @@ public:
return QStringList() << QString("message/rfc822");
}
private slots:
private Q_SLOTS:
void slotItemsReceived(const Akonadi::Item::List& itemList);
private:
void insertEmailBody(QTextCursor& cursor, const QString& body);
......
......@@ -39,7 +39,7 @@ public:
<< QLatin1String("inode/directory");
}
private slots:
private Q_SLOTS:
void slotGotPreview(const KFileItem& item, const QPixmap& pixmap);
void slotJobFinished(KJob* job);
};
......
......@@ -41,7 +41,7 @@ void TextPlugin::generatePreview()
return;
}
QString path = QStandardPaths::locate(QStandardPaths::GenericDataLocation, "plasma/plasmoids/org.kde.milou/contents/ui/previews/TextPreview.qml");
QString path = QStandardPaths::locate(QStandardPaths::GenericDataLocation, QStringLiteral("plasma/plasmoids/org.kde.milou/contents/ui/previews/TextPreview.qml"));
QQmlComponent component(context()->engine(), path);
QQuickItem *item = qobject_cast<QQuickItem *>(component.create());
......
......@@ -44,7 +44,7 @@ SourcesModel::SourcesModel(QObject* parent)
KDirWatch* watch = KDirWatch::self();
connect(watch, &KDirWatch::created, this, &SourcesModel::slotSettingsFileChanged);
connect(watch, &KDirWatch::dirty, this, &SourcesModel::slotSettingsFileChanged);
watch->addFile(QStandardPaths::locate(QStandardPaths::ConfigLocation, "krunnerrc"));
watch->addFile(QStandardPaths::locate(QStandardPaths::ConfigLocation, QStringLiteral("krunnerrc")));
m_resetTimer.setSingleShot(true);
m_resetTimer.setInterval(500);
......@@ -417,7 +417,7 @@ bool SourcesModel::runAction(int index, int actionIndex)
void SourcesModel::reloadConfiguration()
{
KSharedConfig::openConfig("krunnerrc")->reparseConfiguration();
KSharedConfig::openConfig(QStringLiteral("krunnerrc"))->reparseConfiguration();
m_manager->reloadConfiguration();
}
......
......@@ -74,7 +74,7 @@ public:
QHash<int, QByteArray> roleNames() const override;
signals:
Q_SIGNALS:
/**
* This signal is emitted when a an InformationalMatch is run, and it is advised
* to update the search term.
......@@ -84,7 +84,7 @@ signals:
void runnerChanged();
public slots:
public Q_SLOTS:
void reloadConfiguration();
void setQueryString(const QString& str);
void setQueryLimit(int limit);
......@@ -99,7 +99,7 @@ public slots:
Q_INVOKABLE QMimeData *getMimeData(int index) const;
private slots:
private Q_SLOTS:
void slotMatchesChanged(const QList<Plasma::QueryMatch>& list);
void slotMatchAdded(const Plasma::QueryMatch& match);
void slotResetTimeout();
......
......@@ -31,7 +31,7 @@ using namespace Milou;
class TestObject : public QObject {
Q_OBJECT
public slots:
public Q_SLOTS:
void fire() {
i++;
if (i > queryString.size()) {
......@@ -75,7 +75,7 @@ int main(int argc, char** argv)
Q_UNUSED(mt);
model->setQueryLimit(20);
TestObject obj("Summer");
TestObject obj(QStringLiteral("Summer"));
obj.model = model;
obj.timer.start();
......
......@@ -34,7 +34,7 @@ using namespace Milou;
class TestObject : public QWidget {
Q_OBJECT
public slots:
public Q_SLOTS:
void main();
public:
......
......@@ -40,13 +40,13 @@ public:
Q_INVOKABLE QPoint tooltipPosition(QGraphicsObject* item, int tipWidth, int tipHeight);
public slots:
public Q_SLOTS:
bool isTopEdge() const;
bool isBottomEdge() const;
bool isShown() const;
signals:
Q_SIGNALS:
void popupEventSignal(bool shown);
void settingsChanged();
......
......@@ -32,10 +32,10 @@ public:
explicit ConfigWidget(QWidget* parent = 0, Qt::WindowFlags f = 0);
virtual ~ConfigWidget();
public slots:
public Q_SLOTS:
void saveSettings();
signals:
Q_SIGNALS:
void changed();
private:
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment