diff options
author | Christian Mollekopf <chrigi_1@fastmail.fm> | 2015-04-21 15:44:54 +0200 |
---|---|---|
committer | Christian Mollekopf <chrigi_1@fastmail.fm> | 2015-04-21 15:44:54 +0200 |
commit | 2998d9d3d5dfc825904b53393e9ae12e7cd5b72b (patch) | |
tree | 40b4508a4b5ec7d66609634f025a72d756df738c | |
parent | 47f105febcd17d6db1f998a99c6c6c423851573a (diff) | |
download | sink-2998d9d3d5dfc825904b53393e9ae12e7cd5b72b.tar.gz sink-2998d9d3d5dfc825904b53393e9ae12e7cd5b72b.zip |
Moved Console to client.
It's part of the demo application.
-rw-r--r-- | common/CMakeLists.txt | 3 | ||||
-rw-r--r-- | examples/client/CMakeLists.txt | 2 | ||||
-rw-r--r-- | examples/client/console.cpp (renamed from common/console.cpp) | 4 | ||||
-rw-r--r-- | examples/client/console.h (renamed from common/console.h) | 9 | ||||
-rw-r--r-- | examples/client/main.cpp | 6 | ||||
-rw-r--r-- | synchronizer/listener.cpp | 1 |
6 files changed, 6 insertions, 19 deletions
diff --git a/common/CMakeLists.txt b/common/CMakeLists.txt index c18d98a..f6847a7 100644 --- a/common/CMakeLists.txt +++ b/common/CMakeLists.txt | |||
@@ -28,7 +28,6 @@ set(command_SRCS | |||
28 | entitybuffer.cpp | 28 | entitybuffer.cpp |
29 | clientapi.cpp | 29 | clientapi.cpp |
30 | commands.cpp | 30 | commands.cpp |
31 | console.cpp | ||
32 | facade.cpp | 31 | facade.cpp |
33 | pipeline.cpp | 32 | pipeline.cpp |
34 | domainadaptor.cpp | 33 | domainadaptor.cpp |
@@ -44,6 +43,6 @@ set(command_SRCS | |||
44 | add_library(${PROJECT_NAME} SHARED ${command_SRCS}) | 43 | add_library(${PROJECT_NAME} SHARED ${command_SRCS}) |
45 | generate_export_header(${PROJECT_NAME} BASE_NAME Akonadi2Common EXPORT_FILE_NAME akonadi2common_export.h) | 44 | generate_export_header(${PROJECT_NAME} BASE_NAME Akonadi2Common EXPORT_FILE_NAME akonadi2common_export.h) |
46 | SET_TARGET_PROPERTIES(${PROJECT_NAME} PROPERTIES LINKER_LANGUAGE CXX) | 45 | SET_TARGET_PROPERTIES(${PROJECT_NAME} PROPERTIES LINKER_LANGUAGE CXX) |
47 | qt5_use_modules(${PROJECT_NAME} Widgets Network) | 46 | qt5_use_modules(${PROJECT_NAME} Network) |
48 | target_link_libraries(${PROJECT_NAME} ${storage_LIBS} akonadi2async) | 47 | target_link_libraries(${PROJECT_NAME} ${storage_LIBS} akonadi2async) |
49 | install(TARGETS ${PROJECT_NAME} ${KDE_INSTALL_TARGETS_DEFAULT_ARGS}) | 48 | install(TARGETS ${PROJECT_NAME} ${KDE_INSTALL_TARGETS_DEFAULT_ARGS}) |
diff --git a/examples/client/CMakeLists.txt b/examples/client/CMakeLists.txt index 3555b3e..97b5ad2 100644 --- a/examples/client/CMakeLists.txt +++ b/examples/client/CMakeLists.txt | |||
@@ -2,7 +2,7 @@ project(akonadi2_client) | |||
2 | 2 | ||
3 | include_directories(${CMAKE_CURRENT_SOURCE_DIR} ${CMAKE_CURRENT_BINARY_DIR}) | 3 | include_directories(${CMAKE_CURRENT_SOURCE_DIR} ${CMAKE_CURRENT_BINARY_DIR}) |
4 | 4 | ||
5 | add_executable(${PROJECT_NAME} main.cpp) | 5 | add_executable(${PROJECT_NAME} main.cpp console.cpp) |
6 | target_link_libraries(${PROJECT_NAME} akonadi2common) | 6 | target_link_libraries(${PROJECT_NAME} akonadi2common) |
7 | qt5_use_modules(${PROJECT_NAME} Widgets Network) | 7 | qt5_use_modules(${PROJECT_NAME} Widgets Network) |
8 | install(TARGETS ${PROJECT_NAME} ${KDE_INSTALL_TARGETS_DEFAULT_ARGS}) | 8 | install(TARGETS ${PROJECT_NAME} ${KDE_INSTALL_TARGETS_DEFAULT_ARGS}) |
diff --git a/common/console.cpp b/examples/client/console.cpp index 97a6e88..8b4f1a5 100644 --- a/common/console.cpp +++ b/examples/client/console.cpp | |||
@@ -25,9 +25,6 @@ | |||
25 | #include <QTextBrowser> | 25 | #include <QTextBrowser> |
26 | #include <QVBoxLayout> | 26 | #include <QVBoxLayout> |
27 | 27 | ||
28 | namespace Akonadi2 | ||
29 | { | ||
30 | |||
31 | static Console *s_console = 0; | 28 | static Console *s_console = 0; |
32 | 29 | ||
33 | Console *Console::main() | 30 | Console *Console::main() |
@@ -77,4 +74,3 @@ void Console::log(const QString &message) | |||
77 | m_textDisplay->append(QString::number(m_timestamper.elapsed()).rightJustified(6) + ": " + message); | 74 | m_textDisplay->append(QString::number(m_timestamper.elapsed()).rightJustified(6) + ": " + message); |
78 | } | 75 | } |
79 | 76 | ||
80 | } // namespace Akonadi2 | ||
diff --git a/common/console.h b/examples/client/console.h index edfc8e5..a6fef01 100644 --- a/common/console.h +++ b/examples/client/console.h | |||
@@ -20,17 +20,12 @@ | |||
20 | 20 | ||
21 | #pragma once | 21 | #pragma once |
22 | 22 | ||
23 | #include <akonadi2common_export.h> | ||
24 | |||
25 | #include <QTime> | 23 | #include <QTime> |
26 | #include <QWidget> | 24 | #include <QWidget> |
27 | 25 | ||
28 | class QTextBrowser; | 26 | class QTextBrowser; |
29 | 27 | ||
30 | namespace Akonadi2 | 28 | class Console : public QWidget |
31 | { | ||
32 | |||
33 | class AKONADI2COMMON_EXPORT Console : public QWidget | ||
34 | { | 29 | { |
35 | Q_OBJECT | 30 | Q_OBJECT |
36 | public: | 31 | public: |
@@ -45,5 +40,3 @@ private: | |||
45 | QTime m_timestamper; | 40 | QTime m_timestamper; |
46 | static Console *s_output; | 41 | static Console *s_output; |
47 | }; | 42 | }; |
48 | |||
49 | } // namespace Akonadi2 | ||
diff --git a/examples/client/main.cpp b/examples/client/main.cpp index b4cb081..5cd6141 100644 --- a/examples/client/main.cpp +++ b/examples/client/main.cpp | |||
@@ -21,15 +21,15 @@ | |||
21 | #include <QCommandLineParser> | 21 | #include <QCommandLineParser> |
22 | 22 | ||
23 | #include "common/commands.h" | 23 | #include "common/commands.h" |
24 | #include "common/console.h" | ||
25 | #include "common/resourceaccess.h" | 24 | #include "common/resourceaccess.h" |
25 | #include "console.h" | ||
26 | 26 | ||
27 | int main(int argc, char *argv[]) | 27 | int main(int argc, char *argv[]) |
28 | { | 28 | { |
29 | QApplication app(argc, argv); | 29 | QApplication app(argc, argv); |
30 | 30 | ||
31 | new Akonadi2::Console("Akonadi2 Client"); | 31 | new Console("Akonadi2 Client"); |
32 | Akonadi2::Console::main()->log(QString("PID: %1").arg(QCoreApplication::applicationPid())); | 32 | Console::main()->log(QString("PID: %1").arg(QCoreApplication::applicationPid())); |
33 | 33 | ||
34 | QCommandLineParser cliOptions; | 34 | QCommandLineParser cliOptions; |
35 | cliOptions.addPositionalArgument(QObject::tr("[resource]"), | 35 | cliOptions.addPositionalArgument(QObject::tr("[resource]"), |
diff --git a/synchronizer/listener.cpp b/synchronizer/listener.cpp index c68bd9a..e930a02 100644 --- a/synchronizer/listener.cpp +++ b/synchronizer/listener.cpp | |||
@@ -20,7 +20,6 @@ | |||
20 | #include "listener.h" | 20 | #include "listener.h" |
21 | 21 | ||
22 | #include "common/clientapi.h" | 22 | #include "common/clientapi.h" |
23 | #include "common/console.h" | ||
24 | #include "common/commands.h" | 23 | #include "common/commands.h" |
25 | #include "common/resource.h" | 24 | #include "common/resource.h" |
26 | #include "common/log.h" | 25 | #include "common/log.h" |