Skip to content

Commit

Permalink
Avoid Qt module includes
Browse files Browse the repository at this point in the history
This reduces compile time and avoids depending on transient includes
  • Loading branch information
alex1701c committed May 5, 2024
1 parent 5069c3a commit db1d877
Show file tree
Hide file tree
Showing 10 changed files with 21 additions and 15 deletions.
1 change: 1 addition & 0 deletions CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,7 @@ project(quickwebshortcuts)

set(QT_MIN_VERSION "5.15.0")
set(KF_MIN_VERSION "5.91.0")
set(KDE_COMPILERSETTINGS_LEVEL "5.82.0")

find_package(ECM ${KF_MIN_VERSION} REQUIRED NO_MODULE)
add_definitions(-DQT_NO_KEYWORDS)
Expand Down
1 change: 0 additions & 1 deletion src/config/SearchEngineItem.h
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,6 @@

#include "ui_search_engine_item.h"

#include <QtCore>
#include <QWidget>
#include <KConfigWidgets/KCModule>

Expand Down
6 changes: 4 additions & 2 deletions src/config/quick_web_shortcuts_config.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -3,8 +3,10 @@
#include "api_language_utility.h"
#include <KSharedConfig>
#include <KPluginFactory>
#include <QtDebug>
#include <QtWidgets/QFileDialog>
#include <QDebug>
#include <QTimer>
#include <QMetaEnum>
#include <QFileDialog>

#include <utilities.h>

Expand Down
4 changes: 2 additions & 2 deletions src/config/quick_web_shortcuts_config.h
Original file line number Diff line number Diff line change
Expand Up @@ -3,9 +3,9 @@

#include "ui_quick_web_shortcuts_config.h"
#include <KCModule>
#include <KConfigCore/KConfigGroup>
#include <KConfigGroup>
#include <QNetworkReply>
#include "SearchEngineItem.h"
#include <QtNetwork>

#ifndef NO_PROXY_INTEGRATION

Expand Down
3 changes: 2 additions & 1 deletion src/quick_web_shortcuts.cpp
Original file line number Diff line number Diff line change
@@ -1,6 +1,7 @@
#include "quick_web_shortcuts.h"
#include <QtGui/QtGui>
#include <QAction>
#include <QEventLoop>
#include <QProcess>
#include <KShell>
#include <KNotifications/KNotification>
#include "searchengines/SearchEngines.h"
Expand Down
4 changes: 2 additions & 2 deletions src/searchengines/SearchEngines.h
Original file line number Diff line number Diff line change
Expand Up @@ -2,10 +2,10 @@
#define QUICKWEBSHORTCUTS_SEARCHENGINES_H


#include <QtCore/QString>
#include <QMap>
#include <QDir>
#include <KSharedConfig>
#include <QtWidgets/QComboBox>
#include <QComboBox>
#include <Config.h>
#include "SearchEngine.h"

Expand Down
9 changes: 7 additions & 2 deletions src/searchproviders/Bing.h
Original file line number Diff line number Diff line change
Expand Up @@ -2,10 +2,15 @@
#define QUICKWEBSHORTCUTS_BING_H


#include <QtNetwork/QNetworkReply>
#include <QTimer>
#include <QMetaEnum>
#include <QNetworkReply>
#include <QNetworkAccessManager>
#include <KRunner/AbstractRunner>
#include <QUrlQuery>
#include <QJsonDocument>
#include <QJsonArray>
#include <KNotifications/KNotification>
#include <QtCore>
#include <utility>
#include "RequiredData.h"

Expand Down
3 changes: 1 addition & 2 deletions src/searchproviders/DuckDuckGo.h
Original file line number Diff line number Diff line change
Expand Up @@ -2,11 +2,10 @@
#define QUICKWEBSHORTCUTS_DUCKDUCKGO_H


#include <QtNetwork>
#include <QtCore>
#include <utility>
#include <QTextDocument>
#include <QNetworkAccessManager>
#include <QMetaEnum>
#include <KNotifications/KNotification>
#include "RequiredData.h"
#include <KRunner/RunnerContext>
Expand Down
4 changes: 2 additions & 2 deletions src/searchproviders/Google.h
Original file line number Diff line number Diff line change
@@ -1,8 +1,8 @@
#ifndef QUICKWEBSHORTCUTS_GOOGLE_H
#define QUICKWEBSHORTCUTS_GOOGLE_H

#include <QtNetwork/QNetworkReply>
#include <QtCore>
#include <QNetworkReply>
#include <QXmlStreamReader>
#include <KNotifications/KNotification>
#include <utility>
#include <KRunner/QueryMatch>
Expand Down
1 change: 0 additions & 1 deletion src/utilities.h
Original file line number Diff line number Diff line change
@@ -1,7 +1,6 @@
#ifndef QUICKWEBSHORTCUTS_UTILITIES_H
#define QUICKWEBSHORTCUTS_UTILITIES_H

#include <QtCore>
#include <QNetworkProxy>
#include <KSharedConfig>
#include <KConfigGroup>
Expand Down

0 comments on commit db1d877

Please sign in to comment.