aboutsummaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authorAqua-sama <aqua@iserlohn-fortress.net>2018-09-18 17:11:01 +0200
committerAqua-sama <aqua@iserlohn-fortress.net>2018-09-18 17:11:01 +0200
commitddf4f8cb9c2c3caa668915b222cccca6bd5e0094 (patch)
tree70f25ce68f3a90e929cfb7158b3a0cf45f97056f /src
parentUpdater: add --dry-run parameter (diff)
downloadsmolbote-ddf4f8cb9c2c3caa668915b222cccca6bd5e0094.tar.xz
Update vendor.cmake
- add some more comments - made plugin include paths more generic
Diffstat (limited to 'src')
-rw-r--r--src/CMakeLists.txt31
-rw-r--r--src/browser.cpp6
-rw-r--r--src/mainwindow/mainwindow.cpp4
-rw-r--r--src/session.cpp2
-rw-r--r--src/subwindow/subwindow.cpp6
-rw-r--r--src/subwindow/tabwidget.cpp2
-rw-r--r--src/webengine/webview.cpp4
7 files changed, 29 insertions, 26 deletions
diff --git a/src/CMakeLists.txt b/src/CMakeLists.txt
index 5db6e36..df2aeeb 100644
--- a/src/CMakeLists.txt
+++ b/src/CMakeLists.txt
@@ -6,14 +6,16 @@ set(CMAKE_AUTOMOC ON)
set(CMAKE_AUTOUIC ON)
set(CMAKE_AUTORCC ON)
-set(poi_SRC
+set(srclist
# main
main.cpp
browser.cpp
browser.h
session.cpp
session.h
- ../data/resources.qrc
+
+ # resources (icons, etc)
+ ${PROJECT_SOURCE_DIR}/data/resources.qrc
# main window
mainwindow/mainwindow.cpp
@@ -46,19 +48,19 @@ set(poi_SRC
)
if(${CMAKE_SYSTEM_NAME} MATCHES "Windows")
- add_executable(${poi_NAME} WIN32 ${poi_SRC} ../data/windows.rc)
+ add_executable(${poi_exe} WIN32 ${srclist} ${PROJECT_SOURCE_DIR}/data/windows.rc)
else()
- add_executable(${poi_NAME} ${poi_SRC})
+ add_executable(${poi_exe} ${srclist})
endif()
-target_include_directories(${poi_NAME}
+target_include_directories(${poi_exe}
PRIVATE ${Boost_INCLUDE_DIRS}
- PRIVATE ../3rd-party
- PRIVATE ../lib ../plugins
- PRIVATE ../lib/configuration
- PRIVATE ../lib/web)
+ PRIVATE ${PROJECT_SOURCE_DIR}/3rd-party
+ PRIVATE ${PROJECT_SOURCE_DIR}/lib
+ PRIVATE ${PROJECT_SOURCE_DIR}/plugins
+)
-target_link_libraries(${poi_NAME}
+target_link_libraries(${poi_exe}
Qt5::Core Qt5::Widgets Qt5::Concurrent Qt5::WebEngineWidgets
${Boost_LIBRARIES}
SingleApplication
@@ -69,16 +71,17 @@ target_link_libraries(${poi_NAME}
)
if(Plasma)
- target_link_libraries(${poi_NAME} KF5::WindowSystem)
- target_compile_definitions(${poi_NAME}
+ target_link_libraries(${poi_exe} KF5::WindowSystem)
+ target_compile_definitions(${poi_exe}
PRIVATE PLASMA_BLUR # give the main window a translucent background and blur
)
endif(Plasma)
-target_compile_definitions(${poi_NAME}
+target_compile_definitions(${poi_exe}
PRIVATE QAPPLICATION_CLASS=QApplication
+ PRIVATE POI_NAME=\"${poi_name}\"
PRIVATE QTBUG_65223_WORKAROUND
#PRIVATE QTBUG_68224_WORKAROUND
)
-install(TARGETS ${poi_NAME} RUNTIME DESTINATION ${BINARY_DESTINATION} CONFIGURATIONS Release)
+install(TARGETS ${poi_exe} RUNTIME DESTINATION ${installPath_bin} CONFIGURATIONS Release)
diff --git a/src/browser.cpp b/src/browser.cpp
index 493493f..b5c98b0 100644
--- a/src/browser.cpp
+++ b/src/browser.cpp
@@ -22,14 +22,14 @@
#include <configuration/configuration.h>
#include <downloads/downloadswidget.h>
#include <version.h>
-#include <webprofile.h>
-#include "profilemanager.h"
+#include <web/webprofile.h>
+#include <web/profilemanager.h>
#include <QJsonDocument>
Browser::Browser(int &argc, char *argv[], bool allowSecondary)
: SingleApplication(argc, argv, allowSecondary, SingleApplication::User | SingleApplication::SecondaryNotification | SingleApplication::ExcludeAppVersion)
{
- setApplicationName("smolbote");
+ setApplicationName(POI_NAME);
setWindowIcon(QIcon(":/icon.svg"));
setApplicationVersion(SMOLBOTE_VERSION);
}
diff --git a/src/mainwindow/mainwindow.cpp b/src/mainwindow/mainwindow.cpp
index eb4d34f..36fd8a6 100644
--- a/src/mainwindow/mainwindow.cpp
+++ b/src/mainwindow/mainwindow.cpp
@@ -29,13 +29,13 @@
#include <QToolBar>
#include <QUrl>
#include <configuration/configuration.h>
-#include <webprofile.h>
+#include <web/webprofile.h>
#include "session.h"
#include <QFileDialog>
#include <QPrinter>
#include <QPrinterInfo>
#include <QPrintDialog>
-#include "profilemanager.h"
+#include <web/profilemanager.h>
#include <QVBoxLayout>
#ifdef PLASMA_BLUR
#include <KWindowEffects>
diff --git a/src/session.cpp b/src/session.cpp
index 414e8aa..e1f600a 100644
--- a/src/session.cpp
+++ b/src/session.cpp
@@ -12,7 +12,7 @@
#include <QJsonObject>
#include <QJsonArray>
#include "webengine/webview.h"
-#include "profilemanager.h"
+#include <web/profilemanager.h>
Session::Session(QObject *parent) : QObject(parent)
{
diff --git a/src/subwindow/subwindow.cpp b/src/subwindow/subwindow.cpp
index 0873010..e4affec 100644
--- a/src/subwindow/subwindow.cpp
+++ b/src/subwindow/subwindow.cpp
@@ -18,9 +18,9 @@
#include <QShortcut>
#include <QStyle>
#include <QToolButton>
-#include <webprofile.h>
-#include "profilemanager.h"
-#include <configuration.h>
+#include <web/webprofile.h>
+#include <web/profilemanager.h>
+#include <configuration/configuration.h>
#include <QTabBar>
SubWindow::SubWindow(const std::unique_ptr<Configuration> &config, QWidget *parent, Qt::WindowFlags flags)
diff --git a/src/subwindow/tabwidget.cpp b/src/subwindow/tabwidget.cpp
index 1ddfc95..5583bcd 100644
--- a/src/subwindow/tabwidget.cpp
+++ b/src/subwindow/tabwidget.cpp
@@ -13,7 +13,7 @@
#include <QContextMenuEvent>
#include <QMenu>
#include <QTabBar>
-#include <webprofile.h>
+#include <web/webprofile.h>
TabWidget::TabWidget(QWidget *parent)
: QTabWidget(parent)
diff --git a/src/webengine/webview.cpp b/src/webengine/webview.cpp
index 963a894..ee08c34 100644
--- a/src/webengine/webview.cpp
+++ b/src/webengine/webview.cpp
@@ -7,10 +7,10 @@
*/
#include "webview.h"
-#include "profilemanager.h"
+#include <web/profilemanager.h>
#include "subwindow/subwindow.h"
#include "webpage.h"
-#include "webprofile.h"
+#include <web/webprofile.h>
#include <QContextMenuEvent>
#include <QDialog>
#include <QMenu>