aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorArttu Tarkiainen <arttu.tarkiainen@qt.io>2023-01-17 13:57:03 +0200
committerArttu Tarkiainen <arttu.tarkiainen@qt.io>2023-01-18 12:50:05 +0000
commit4d72bcd655cf61088cacbac01ca28eb4a2250cd1 (patch)
tree8f95d9d0e790e06c1c722363175ec191225a7a24
parentd9d3a9db7e6fca8c791ceda6f16611c0067c7f29 (diff)
Reshuffle some includes
This fixes the clangd warnings about included headers that were not used directly. Change-Id: I502be0257f6c5265bc9c72b739aebcb7629638aa Reviewed-by: Sami Littow <sami.littow@qt.io> Reviewed-by: Iikka Eklund <iikka.eklund@qt.io>
-rw-r--r--include/commonsetup.h1
-rw-r--r--include/httpclient.h1
-rw-r--r--include/jsonhandler.h1
-rw-r--r--include/licdsetup.h3
-rw-r--r--include/licenser.h9
-rw-r--r--include/tcpserver.h3
-rw-r--r--include/utils.h1
-rw-r--r--mocwrapper/mocwrapper.cpp6
-rw-r--r--mocwrapper/mocwrapper.h6
-rw-r--r--qtlicensetool/qtlicensetool.cpp5
-rw-r--r--qtlicensetool/qtlicensetool.h3
-rw-r--r--src/clienthandler.cpp3
-rw-r--r--src/daemon_clients/clienthandler.h4
-rw-r--r--src/daemon_clients/clitoolhandler.h2
-rw-r--r--src/daemon_clients/cocohandler.h1
-rw-r--r--src/daemon_clients/mochandler.h2
-rw-r--r--src/daemon_clients/pluginhandler.h2
-rw-r--r--src/daemon_clients/squishhandler.h2
-rw-r--r--src/daemon_clients/squishidehandler.h1
-rw-r--r--src/httpclient.cpp2
-rw-r--r--src/jsonhandler.cpp2
-rw-r--r--src/licdsetup.cpp3
-rw-r--r--src/licenser.cpp10
23 files changed, 44 insertions, 29 deletions
diff --git a/include/commonsetup.h b/include/commonsetup.h
index 5bace4c..d0f403b 100644
--- a/include/commonsetup.h
+++ b/include/commonsetup.h
@@ -6,7 +6,6 @@
#include <map>
#include <string>
-#include "version.h"
#define DAEMON_ADDR "localhost"
#define DAEMON_PORT 60000
diff --git a/include/httpclient.h b/include/httpclient.h
index b1a63c1..a587c67 100644
--- a/include/httpclient.h
+++ b/include/httpclient.h
@@ -7,7 +7,6 @@
#include <iostream>
#include <sstream>
#include <map>
-#include "version.h"
#define SERVER_CONN_TIMEOUT 10
diff --git a/include/jsonhandler.h b/include/jsonhandler.h
index 18baad0..3755f19 100644
--- a/include/jsonhandler.h
+++ b/include/jsonhandler.h
@@ -10,7 +10,6 @@
#include <vector>
#include <iostream>
#include <iomanip>
-#include "utils.h"
// Very simple JSON reader/writer, takes a JSON string as input
// Specific to Qt license daemon only, doesn't work with JSONs in general
diff --git a/include/licdsetup.h b/include/licdsetup.h
index 41c5564..d4c7d84 100644
--- a/include/licdsetup.h
+++ b/include/licdsetup.h
@@ -4,9 +4,6 @@
*/
#pragma once
-#include "commonsetup.h"
-#include "utils.h"
-
#include <iostream>
#include <string>
#include <map>
diff --git a/include/licenser.h b/include/licenser.h
index 1f7256d..a15f1fa 100644
--- a/include/licenser.h
+++ b/include/licenser.h
@@ -20,17 +20,8 @@
#endif
#include "httpclient.h"
#include "tcpserver.h"
-#include "utils.h"
-#include "hmac_sha256.h"
-#include "jsonhandler.h"
#include "licdsetup.h"
#include "clienthandler.h"
-#include "mochandler.h"
-#include "clitoolhandler.h"
-#include "pluginhandler.h"
-#include "cocohandler.h"
-#include "squishhandler.h"
-#include "squishidehandler.h"
class Licenser
{
diff --git a/include/tcpserver.h b/include/tcpserver.h
index f7def7a..a031b88 100644
--- a/include/tcpserver.h
+++ b/include/tcpserver.h
@@ -25,8 +25,7 @@
#include <unistd.h>
#include <netdb.h>
#include <sys/time.h>
- #include "curl/curl.h"
- typedef int type_socket;
+typedef int type_socket;
#else
#define WIN32_LEAN_AND_MEAN
#include <windows.h>
diff --git a/include/utils.h b/include/utils.h
index a215ffd..f714e92 100644
--- a/include/utils.h
+++ b/include/utils.h
@@ -3,7 +3,6 @@
* SPDX-License-Identifier: GPL-3.0-only WITH Qt-GPL-exception-1.0
*/
#pragma once
-#include "commonsetup.h"
#include <sys/stat.h>
#include <sys/types.h>
diff --git a/mocwrapper/mocwrapper.cpp b/mocwrapper/mocwrapper.cpp
index d22137c..a992005 100644
--- a/mocwrapper/mocwrapper.cpp
+++ b/mocwrapper/mocwrapper.cpp
@@ -5,6 +5,12 @@
#include "mocwrapper.h"
+#include "licdsetup.h"
+#include "tcpclient.h"
+#include "version.h"
+#include "commonsetup.h"
+#include "utils.h"
+
int main(int argc, char *argv[])
{
// First check if version is asked
diff --git a/mocwrapper/mocwrapper.h b/mocwrapper/mocwrapper.h
index 8b7e363..6c4deaa 100644
--- a/mocwrapper/mocwrapper.h
+++ b/mocwrapper/mocwrapper.h
@@ -17,12 +17,6 @@
#include <process.h>
#endif
-#include "tcpclient.h"
-#include "utils.h"
-#include "commonsetup.h"
-#include "licdsetup.h"
-
-
#define BUFFER_SIZE 1024
int getUserInfo(const std::string &filepath);
diff --git a/qtlicensetool/qtlicensetool.cpp b/qtlicensetool/qtlicensetool.cpp
index a166876..6c0bbc9 100644
--- a/qtlicensetool/qtlicensetool.cpp
+++ b/qtlicensetool/qtlicensetool.cpp
@@ -5,6 +5,11 @@
#include "qtlicensetool.h"
+#include "commonsetup.h"
+#include "tcpclient.h"
+#include "utils.h"
+#include "version.h"
+
int main(int argc, char *argv[])
{
// Fetch the settings from .ini file
diff --git a/qtlicensetool/qtlicensetool.h b/qtlicensetool/qtlicensetool.h
index 8a88560..25ef04b 100644
--- a/qtlicensetool/qtlicensetool.h
+++ b/qtlicensetool/qtlicensetool.h
@@ -36,9 +36,6 @@ enum qt_tool_action_type {
e_action_license_query = 4
};
-#include "tcpclient.h"
-#include "utils.h"
-#include "commonsetup.h"
#include "licdsetup.h"
#define APP_NAME "Qt licensing CLI"
diff --git a/src/clienthandler.cpp b/src/clienthandler.cpp
index b5fec10..1c1c6c9 100644
--- a/src/clienthandler.cpp
+++ b/src/clienthandler.cpp
@@ -5,6 +5,9 @@
#include "clienthandler.h"
+#include "jsonhandler.h"
+#include "utils.h"
+
bool ClientHandler::checkLicenseExpiryTime(std::string &reply)
{
std::cout << "Offline - checking validity from license file " << m_request.licenseFile << std::endl;
diff --git a/src/daemon_clients/clienthandler.h b/src/daemon_clients/clienthandler.h
index 695847e..8d04be8 100644
--- a/src/daemon_clients/clienthandler.h
+++ b/src/daemon_clients/clienthandler.h
@@ -7,10 +7,10 @@
#include <iostream>
#include <string>
-#include "utils.h"
+#include <vector>
+
#include "commonsetup.h"
#include "licdsetup.h"
-#include "jsonhandler.h"
class ClientHandler
{
diff --git a/src/daemon_clients/clitoolhandler.h b/src/daemon_clients/clitoolhandler.h
index c9446d1..ce3429e 100644
--- a/src/daemon_clients/clitoolhandler.h
+++ b/src/daemon_clients/clitoolhandler.h
@@ -5,6 +5,8 @@
#pragma once
#include "clienthandler.h"
+#include "jsonhandler.h"
+#include "utils.h"
class CliToolHandler : public virtual ClientHandler {
diff --git a/src/daemon_clients/cocohandler.h b/src/daemon_clients/cocohandler.h
index 54fa49b..48494e0 100644
--- a/src/daemon_clients/cocohandler.h
+++ b/src/daemon_clients/cocohandler.h
@@ -5,6 +5,7 @@
#pragma once
#include "clienthandler.h"
+#include "utils.h"
class CocoHandler : public ClientHandler {
diff --git a/src/daemon_clients/mochandler.h b/src/daemon_clients/mochandler.h
index d73f8db..acf1228 100644
--- a/src/daemon_clients/mochandler.h
+++ b/src/daemon_clients/mochandler.h
@@ -5,6 +5,8 @@
#pragma once
#include "clienthandler.h"
+#include "jsonhandler.h"
+#include "utils.h"
class MocHandler : virtual public ClientHandler {
public:
diff --git a/src/daemon_clients/pluginhandler.h b/src/daemon_clients/pluginhandler.h
index 6d39500..27eae11 100644
--- a/src/daemon_clients/pluginhandler.h
+++ b/src/daemon_clients/pluginhandler.h
@@ -5,6 +5,8 @@
#pragma once
#include "clienthandler.h"
+#include "jsonhandler.h"
+#include "utils.h"
class PluginHandler : public ClientHandler {
diff --git a/src/daemon_clients/squishhandler.h b/src/daemon_clients/squishhandler.h
index 2542442..04d1abb 100644
--- a/src/daemon_clients/squishhandler.h
+++ b/src/daemon_clients/squishhandler.h
@@ -5,6 +5,8 @@
#pragma once
#include "clienthandler.h"
+#include "jsonhandler.h"
+#include "utils.h"
class SquishHandler : public ClientHandler {
diff --git a/src/daemon_clients/squishidehandler.h b/src/daemon_clients/squishidehandler.h
index abef26a..30f3447 100644
--- a/src/daemon_clients/squishidehandler.h
+++ b/src/daemon_clients/squishidehandler.h
@@ -5,6 +5,7 @@
#pragma once
#include "clienthandler.h"
+#include "utils.h"
class SquishIdeHandler : public ClientHandler {
diff --git a/src/httpclient.cpp b/src/httpclient.cpp
index 506936c..07d13ea 100644
--- a/src/httpclient.cpp
+++ b/src/httpclient.cpp
@@ -5,6 +5,8 @@
#include "httpclient.h"
+#include "version.h"
+
size_t WriteCallback(char *contents, size_t size, size_t nmemb, void *userp)
{
//std::cout << "Reading data\n";
diff --git a/src/jsonhandler.cpp b/src/jsonhandler.cpp
index b9e5d65..41a0c81 100644
--- a/src/jsonhandler.cpp
+++ b/src/jsonhandler.cpp
@@ -5,6 +5,8 @@
#include "jsonhandler.h"
+#include "utils.h"
+
JsonHandler::JsonHandler(const std::string &jsonString)
{
if (preParse(jsonString) != 0) {
diff --git a/src/licdsetup.cpp b/src/licdsetup.cpp
index 2594485..45addda 100644
--- a/src/licdsetup.cpp
+++ b/src/licdsetup.cpp
@@ -5,6 +5,9 @@
#include "licdsetup.h"
+#include "commonsetup.h"
+#include "utils.h"
+
LicdSetup::LicdSetup(int type, const std::string &callerBinaryPath) :
m_setType(type)
{
diff --git a/src/licenser.cpp b/src/licenser.cpp
index 0b3cc48..0e4540b 100644
--- a/src/licenser.cpp
+++ b/src/licenser.cpp
@@ -5,6 +5,16 @@
#include "licenser.h"
+#include "clitoolhandler.h"
+#include "cocohandler.h"
+#include "mochandler.h"
+#include "pluginhandler.h"
+#include "squishhandler.h"
+#include "squishidehandler.h"
+#include "version.h"
+
+#include "hmac_sha256.h"
+
Licenser::Licenser(uint16_t tcpPort)
{
// Init daemon settings