diff --git a/.travis.yml b/.travis.yml index 49d19649f..f1de95075 100644 --- a/.travis.yml +++ b/.travis.yml @@ -97,7 +97,7 @@ before_install: - | if [ "$gui" = "false" ]; then qmake_conf="$qmake_conf --disable-gui" - cmake_conf="$cmake_conf -DCMAKE_DISABLE_FIND_PACKAGE_Qt5Widgets=ON" + cmake_conf="$cmake_conf -DGUI=OFF" fi # print settings diff --git a/CMakeLists.txt b/CMakeLists.txt index 56fad23bb..d97e60001 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -2,7 +2,7 @@ cmake_minimum_required(VERSION 3.16 FATAL_ERROR) message(AUTHOR_WARNING "If the build fails, please try the autotools/qmake method.") -if(POLICY CMP0074) +if (POLICY CMP0074) cmake_policy(SET CMP0074 NEW) endif() @@ -50,9 +50,9 @@ set(requiredQtVersion 5.9.0) set(requiredOpensslVersion 1.0) set(requiredLibtorrentVersion 1.1.10) -if(WIN32) +if (WIN32) include(winconf) -endif(WIN32) +endif() # we need options here, at the top level, because they are used not only in "src" subdir, but in the "dist" dir too @@ -62,6 +62,8 @@ optional_compile_definitions(COUNTRIES_RESOLUTION FEATURE DESCRIPTION "Enable re DEFAULT ON DISABLED DISABLE_COUNTRIES_RESOLUTION) optional_compile_definitions(STACKTRACE FEATURE DESCRIPTION "Enable stacktraces" DEFAULT ON ENABLED STACKTRACE) +optional_compile_definitions(GUI FEATURE DESCRIPTION "Build GUI application" + DEFAULT ON DISABLED DISABLE_GUI) optional_compile_definitions(WEBUI FEATURE DESCRIPTION "Enables built-in HTTP server for headless use" DEFAULT ON DISABLED DISABLE_WEBUI) diff --git a/dist/CMakeLists.txt b/dist/CMakeLists.txt index be1c8a84f..5d277f6d9 100644 --- a/dist/CMakeLists.txt +++ b/dist/CMakeLists.txt @@ -2,11 +2,8 @@ find_package(Qt5Widgets ${requiredQtVersion}) # to conditionally install desktop if (APPLE) add_subdirectory(mac) -else (APPLE) - if (UNIX) - add_subdirectory(unix) - endif (UNIX) - if (WIN32) - add_subdirectory(windows) - endif (WIN32) -endif (APPLE) +elseif (UNIX) + add_subdirectory(unix) +elseif (WIN32) + add_subdirectory(windows) +endif() diff --git a/src/CMakeLists.txt b/src/CMakeLists.txt index d9e625e54..66a5ad29d 100644 --- a/src/CMakeLists.txt +++ b/src/CMakeLists.txt @@ -12,19 +12,13 @@ if (Boost_VERSION VERSION_LESS 106000) endif() find_package(Qt5 ${requiredQtVersion} REQUIRED COMPONENTS Core Network Xml LinguistTools) -find_package(Qt5Widgets ${requiredQtVersion}) -if (Qt5Widgets_FOUND) +if (NOT DISABLE_GUI) + find_package(Qt5Widgets ${requiredQtVersion} REQUIRED) find_package(Qt5DBus ${requiredQtVersion}) else() add_definitions(-DDISABLE_GUI) endif() -set_package_properties(Qt5Widgets PROPERTIES - DESCRIPTION "Set of components for creating classic desktop-style UIs for the Qt5 framework" - PURPOSE "Enables qBittorrent GUI. Unneeded for headless configuration." - TYPE OPTIONAL -) - set_package_properties(Qt5DBus PROPERTIES DESCRIPTION "Qt5 module for inter-process communication over the D-Bus protocol" PURPOSE "Enables communication with other system components (e.g. notification service) via D-Bus. " @@ -37,7 +31,7 @@ if (APPLE) # Workaround CMake bug (autogen does not pass required parameters to moc) # Relevant issue: https://gitlab.kitware.com/cmake/cmake/issues/18041 list(APPEND CMAKE_AUTOMOC_MOC_OPTIONS -DQ_OS_MACOS -DQ_OS_DARWIN) -endif () +endif() include_directories(${CMAKE_CURRENT_SOURCE_DIR}) @@ -60,7 +54,7 @@ configure_file(config.h.cmakein ${CMAKE_CURRENT_BINARY_DIR}/config.h) add_subdirectory(app) add_subdirectory(base) -if (Qt5Widgets_FOUND) +if (NOT DISABLE_GUI) add_subdirectory(gui) endif () diff --git a/src/app/CMakeLists.txt b/src/app/CMakeLists.txt index 116d0a96e..7ff7f5f9b 100644 --- a/src/app/CMakeLists.txt +++ b/src/app/CMakeLists.txt @@ -1,33 +1,31 @@ add_executable(qBittorrent -# headers -application.h -applicationinstancemanager.h -cmdoptions.h -filelogger.h -qtlocalpeer/qtlocalpeer.h -upgrade.h + # headers + application.h + applicationinstancemanager.h + cmdoptions.h + filelogger.h + qtlocalpeer/qtlocalpeer.h + upgrade.h -# sources -application.cpp -applicationinstancemanager.cpp -cmdoptions.cpp -filelogger.cpp -main.cpp -qtlocalpeer/qtlocalpeer.cpp -upgrade.cpp + # sources + application.cpp + applicationinstancemanager.cpp + cmdoptions.cpp + filelogger.cpp + main.cpp + qtlocalpeer/qtlocalpeer.cpp + upgrade.cpp ) target_include_directories(qBittorrent PRIVATE ${CMAKE_CURRENT_BINARY_DIR}) -target_link_libraries(qBittorrent - PRIVATE - qbt_base -) +target_link_libraries(qBittorrent PRIVATE qbt_base) set_target_properties(qBittorrent PROPERTIES AUTOUIC True AUTORCC True MACOSX_BUNDLE True + RUNTIME_OUTPUT_DIRECTORY "${CMAKE_BINARY_DIR}" ) # translations @@ -42,8 +40,8 @@ if (NOT DISABLE_WEBUI) endif() set(QBT_APP_RESOURCES -../icons/icons.qrc -../searchengine/searchengine.qrc + ../icons/icons.qrc + ../searchengine/searchengine.qrc ) # With AUTORCC rcc is ran by cmake before language files are generated, @@ -53,49 +51,53 @@ qt5_add_resources(QBT_APP_RESOURCE_SOURCE ${QBT_APP_RESOURCES}) if (WIN32) if (MINGW) target_sources(qBittorrent PRIVATE ../qbittorrent_mingw.rc) - else (MINGW) + else() target_sources(qBittorrent PRIVATE ../qbittorrent.rc) - endif (MINGW) + endif() + target_sources(qBittorrent PRIVATE ../qbittorrent.exe.manifest) -endif (WIN32) +endif() if (STACKTRACE) if (UNIX) target_sources(qBittorrent PRIVATE stacktrace.h) - else (UNIX) + else() target_sources(qBittorrent PRIVATE stacktrace_win.h) - if (Qt5Widgets_FOUND) + if (NOT DISABLE_GUI) target_sources(qBittorrent PRIVATE stacktracedialog.cpp stacktracedialog.h) - endif (Qt5Widgets_FOUND) + endif() + if (MSVC) if (NOT "${WINXXBITS}" STREQUAL "Win64") # i686 arch requires frame pointer preservation add_compile_options(-Oy-) - endif (NOT "${WINXXBITS}" STREQUAL "Win64") + endif() + add_compile_options(-Zi) target_link_libraries(qBittorrent PUBLIC dbghelp -DEBUG) - else (MSVC) + else() if (NOT "${WINXXBITS}" STREQUAL "Win64") add_compile_options(-fno-omit-frame-pointer) - endif (NOT "${WINXXBITS}" STREQUAL "Win64") - target_link_libraries(qBittorrent PUBLIC dbghelp -Wl,--export-all-symbols) - endif (MSVC) - endif (UNIX) -endif (STACKTRACE) + endif() -if (Qt5Widgets_FOUND) - target_link_libraries(qBittorrent PRIVATE qbt_searchengine qbt_gui) + target_link_libraries(qBittorrent PUBLIC dbghelp -Wl,--export-all-symbols) + endif() + endif() +endif() + +if (NOT DISABLE_GUI) + target_link_libraries(qBittorrent PRIVATE qbt_gui) set_target_properties(qBittorrent PROPERTIES OUTPUT_NAME qbittorrent WIN32_EXECUTABLE True ) -else(Qt5Widgets_FOUND) +else() set_target_properties(qBittorrent PROPERTIES OUTPUT_NAME qbittorrent-nox ) -endif (Qt5Widgets_FOUND) +endif() if (NOT DISABLE_WEBUI) target_link_libraries(qBittorrent PRIVATE qbt_webui) @@ -127,9 +129,8 @@ if (APPLE) ${QT_TR_DIR}/qt_zh_CN.qm ) list(APPEND QBT_APP_RESOURCE_SOURCE ${QT_TRANSLATIONS}) - set_source_files_properties(${QT_TRANSLATIONS} - PROPERTIES MACOSX_PACKAGE_LOCATION translations) -endif (APPLE) + set_source_files_properties(${QT_TRANSLATIONS} PROPERTIES MACOSX_PACKAGE_LOCATION translations) +endif() target_sources(qBittorrent PRIVATE ${QBT_QM_FILES} ${QBT_APP_RESOURCE_SOURCE}) @@ -138,7 +139,7 @@ get_target_property(QBT_EXECUTABLE_NAME qBittorrent OUTPUT_NAME) if (APPLE) set(qbt_BUNDLE_NAME ${QBT_EXECUTABLE_NAME}) -# substitute @EXECUTABLE@ in dist/mac/Info.plist + # substitute @EXECUTABLE@ in dist/mac/Info.plist set(EXECUTABLE ${qbt_BUNDLE_NAME}) configure_file(${qBittorrent_SOURCE_DIR}/dist/mac/Info.plist ${qBittorrent_BINARY_DIR}/dist/mac/Info.plist @ONLY) @@ -146,15 +147,16 @@ if (APPLE) MACOSX_BUNDLE_BUNDLE_NAME "${qbt_BUNDLE_NAME}" MACOSX_BUNDLE_INFO_PLIST ${qBittorrent_BINARY_DIR}/dist/mac/Info.plist ) -endif (APPLE) +endif() # installation install(TARGETS qBittorrent RUNTIME DESTINATION ${CMAKE_INSTALL_BINDIR} BUNDLE DESTINATION . - COMPONENT runtime) + COMPONENT runtime +) -if (Qt5Widgets_FOUND AND APPLE) +if (NOT DISABLE_GUI AND APPLE) find_package(Qt5Svg REQUIRED) include(bundle) -endif (Qt5Widgets_FOUND AND APPLE) +endif() diff --git a/src/app/application.cpp b/src/app/application.cpp index 16d8ea421..71dcca1b6 100644 --- a/src/app/application.cpp +++ b/src/app/application.cpp @@ -85,11 +85,11 @@ #include "filelogger.h" #ifndef DISABLE_GUI -#include "addnewtorrentdialog.h" +#include "gui/addnewtorrentdialog.h" #include "gui/uithememanager.h" #include "gui/utils.h" -#include "mainwindow.h" -#include "shutdownconfirmdialog.h" +#include "gui/mainwindow.h" +#include "gui/shutdownconfirmdialog.h" #endif // DISABLE_GUI #ifndef DISABLE_WEBUI diff --git a/src/base/CMakeLists.txt b/src/base/CMakeLists.txt index 5d5522737..2f8d8e232 100644 --- a/src/base/CMakeLists.txt +++ b/src/base/CMakeLists.txt @@ -1,159 +1,159 @@ find_package(ZLIB 1.2.5.2 REQUIRED) add_library(qbt_base STATIC -# headers -bittorrent/addtorrentparams.h -bittorrent/cachestatus.h -bittorrent/downloadpriority.h -bittorrent/infohash.h -bittorrent/magneturi.h -bittorrent/peeraddress.h -bittorrent/peerinfo.h -bittorrent/private/bandwidthscheduler.h -bittorrent/private/filterparserthread.h -bittorrent/private/ltunderlyingtype.h -bittorrent/private/nativesessionextension.h -bittorrent/private/nativetorrentextension.h -bittorrent/private/portforwarderimpl.h -bittorrent/private/resumedatasavingmanager.h -bittorrent/private/speedmonitor.h -bittorrent/private/statistics.h -bittorrent/session.h -bittorrent/sessionstatus.h -bittorrent/torrentcreatorthread.h -bittorrent/torrenthandle.h -bittorrent/torrenthandleimpl.h -bittorrent/torrentinfo.h -bittorrent/tracker.h -bittorrent/trackerentry.h -http/connection.h -http/httperror.h -http/irequesthandler.h -http/requestparser.h -http/responsebuilder.h -http/responsegenerator.h -http/server.h -http/types.h -net/dnsupdater.h -net/downloadmanager.h -net/geoipmanager.h -net/portforwarder.h -net/private/downloadhandlerimpl.h -net/private/geoipdatabase.h -net/proxyconfigurationmanager.h -net/reverseresolution.h -net/smtp.h -private/profile_p.h -rss/private/rss_parser.h -rss/rss_article.h -rss/rss_autodownloader.h -rss/rss_autodownloadrule.h -rss/rss_feed.h -rss/rss_folder.h -rss/rss_item.h -rss/rss_session.h -search/searchdownloadhandler.h -search/searchhandler.h -search/searchpluginmanager.h -utils/bytearray.h -utils/foreignapps.h -utils/fs.h -utils/gzip.h -utils/io.h -utils/misc.h -utils/net.h -utils/password.h -utils/random.h -utils/string.h -utils/version.h -algorithm.h -asyncfilestorage.h -exceptions.h -filesystemwatcher.h -global.h -iconprovider.h -indexrange.h -logger.h -preferences.h -profile.h -scanfoldersmodel.h -settingsstorage.h -torrentfileguard.h -torrentfilter.h -tristatebool.h -types.h -unicodestrings.h + # headers + bittorrent/addtorrentparams.h + bittorrent/cachestatus.h + bittorrent/downloadpriority.h + bittorrent/infohash.h + bittorrent/magneturi.h + bittorrent/peeraddress.h + bittorrent/peerinfo.h + bittorrent/private/bandwidthscheduler.h + bittorrent/private/filterparserthread.h + bittorrent/private/ltunderlyingtype.h + bittorrent/private/nativesessionextension.h + bittorrent/private/nativetorrentextension.h + bittorrent/private/portforwarderimpl.h + bittorrent/private/resumedatasavingmanager.h + bittorrent/private/speedmonitor.h + bittorrent/private/statistics.h + bittorrent/session.h + bittorrent/sessionstatus.h + bittorrent/torrentcreatorthread.h + bittorrent/torrenthandle.h + bittorrent/torrenthandleimpl.h + bittorrent/torrentinfo.h + bittorrent/tracker.h + bittorrent/trackerentry.h + http/connection.h + http/httperror.h + http/irequesthandler.h + http/requestparser.h + http/responsebuilder.h + http/responsegenerator.h + http/server.h + http/types.h + net/dnsupdater.h + net/downloadmanager.h + net/geoipmanager.h + net/portforwarder.h + net/private/downloadhandlerimpl.h + net/private/geoipdatabase.h + net/proxyconfigurationmanager.h + net/reverseresolution.h + net/smtp.h + private/profile_p.h + rss/private/rss_parser.h + rss/rss_article.h + rss/rss_autodownloader.h + rss/rss_autodownloadrule.h + rss/rss_feed.h + rss/rss_folder.h + rss/rss_item.h + rss/rss_session.h + search/searchdownloadhandler.h + search/searchhandler.h + search/searchpluginmanager.h + utils/bytearray.h + utils/foreignapps.h + utils/fs.h + utils/gzip.h + utils/io.h + utils/misc.h + utils/net.h + utils/password.h + utils/random.h + utils/string.h + utils/version.h + algorithm.h + asyncfilestorage.h + exceptions.h + filesystemwatcher.h + global.h + iconprovider.h + indexrange.h + logger.h + preferences.h + profile.h + scanfoldersmodel.h + settingsstorage.h + torrentfileguard.h + torrentfilter.h + tristatebool.h + types.h + unicodestrings.h -# sources -bittorrent/downloadpriority.cpp -bittorrent/infohash.cpp -bittorrent/magneturi.cpp -bittorrent/peeraddress.cpp -bittorrent/peerinfo.cpp -bittorrent/private/bandwidthscheduler.cpp -bittorrent/private/filterparserthread.cpp -bittorrent/private/nativesessionextension.cpp -bittorrent/private/nativetorrentextension.cpp -bittorrent/private/portforwarderimpl.cpp -bittorrent/private/resumedatasavingmanager.cpp -bittorrent/private/speedmonitor.cpp -bittorrent/private/statistics.cpp -bittorrent/session.cpp -bittorrent/torrentcreatorthread.cpp -bittorrent/torrenthandle.cpp -bittorrent/torrenthandleimpl.cpp -bittorrent/torrentinfo.cpp -bittorrent/tracker.cpp -bittorrent/trackerentry.cpp -http/connection.cpp -http/httperror.cpp -http/requestparser.cpp -http/responsebuilder.cpp -http/responsegenerator.cpp -http/server.cpp -net/dnsupdater.cpp -net/downloadmanager.cpp -net/geoipmanager.cpp -net/portforwarder.cpp -net/private/downloadhandlerimpl.cpp -net/private/geoipdatabase.cpp -net/proxyconfigurationmanager.cpp -net/reverseresolution.cpp -net/smtp.cpp -private/profile_p.cpp -rss/private/rss_parser.cpp -rss/rss_article.cpp -rss/rss_autodownloader.cpp -rss/rss_autodownloadrule.cpp -rss/rss_feed.cpp -rss/rss_folder.cpp -rss/rss_item.cpp -rss/rss_session.cpp -search/searchdownloadhandler.cpp -search/searchhandler.cpp -search/searchpluginmanager.cpp -utils/bytearray.cpp -utils/foreignapps.cpp -utils/fs.cpp -utils/gzip.cpp -utils/io.cpp -utils/misc.cpp -utils/net.cpp -utils/password.cpp -utils/random.cpp -utils/string.cpp -asyncfilestorage.cpp -exceptions.cpp -filesystemwatcher.cpp -iconprovider.cpp -logger.cpp -preferences.cpp -profile.cpp -scanfoldersmodel.cpp -settingsstorage.cpp -torrentfileguard.cpp -torrentfilter.cpp -tristatebool.cpp + # sources + bittorrent/downloadpriority.cpp + bittorrent/infohash.cpp + bittorrent/magneturi.cpp + bittorrent/peeraddress.cpp + bittorrent/peerinfo.cpp + bittorrent/private/bandwidthscheduler.cpp + bittorrent/private/filterparserthread.cpp + bittorrent/private/nativesessionextension.cpp + bittorrent/private/nativetorrentextension.cpp + bittorrent/private/portforwarderimpl.cpp + bittorrent/private/resumedatasavingmanager.cpp + bittorrent/private/speedmonitor.cpp + bittorrent/private/statistics.cpp + bittorrent/session.cpp + bittorrent/torrentcreatorthread.cpp + bittorrent/torrenthandle.cpp + bittorrent/torrenthandleimpl.cpp + bittorrent/torrentinfo.cpp + bittorrent/tracker.cpp + bittorrent/trackerentry.cpp + http/connection.cpp + http/httperror.cpp + http/requestparser.cpp + http/responsebuilder.cpp + http/responsegenerator.cpp + http/server.cpp + net/dnsupdater.cpp + net/downloadmanager.cpp + net/geoipmanager.cpp + net/portforwarder.cpp + net/private/downloadhandlerimpl.cpp + net/private/geoipdatabase.cpp + net/proxyconfigurationmanager.cpp + net/reverseresolution.cpp + net/smtp.cpp + private/profile_p.cpp + rss/private/rss_parser.cpp + rss/rss_article.cpp + rss/rss_autodownloader.cpp + rss/rss_autodownloadrule.cpp + rss/rss_feed.cpp + rss/rss_folder.cpp + rss/rss_item.cpp + rss/rss_session.cpp + search/searchdownloadhandler.cpp + search/searchhandler.cpp + search/searchpluginmanager.cpp + utils/bytearray.cpp + utils/foreignapps.cpp + utils/fs.cpp + utils/gzip.cpp + utils/io.cpp + utils/misc.cpp + utils/net.cpp + utils/password.cpp + utils/random.cpp + utils/string.cpp + asyncfilestorage.cpp + exceptions.cpp + filesystemwatcher.cpp + iconprovider.cpp + logger.cpp + preferences.cpp + profile.cpp + scanfoldersmodel.cpp + settingsstorage.cpp + torrentfileguard.cpp + torrentfilter.cpp + tristatebool.cpp ) target_link_libraries(qbt_base @@ -164,17 +164,13 @@ target_link_libraries(qbt_base Qt5::Core Qt5::Network Qt5::Xml ) -if (Qt5Widgets_FOUND) - target_link_libraries(qbt_base PUBLIC Qt5::Gui Qt5::Widgets) -endif (Qt5Widgets_FOUND) - if (Qt5DBus_FOUND) target_link_libraries(qbt_base PRIVATE Qt5::DBus) -endif () +endif() if (APPLE) find_library(IOKit_LIBRARY IOKit) find_library(Carbon_LIBRARY Carbon) find_library(AppKit_LIBRARY AppKit) target_link_libraries(qbt_base PRIVATE ${Carbon_LIBRARY} ${IOKit_LIBRARY} ${AppKit_LIBRARY}) -endif (APPLE) +endif() diff --git a/src/base/preferences.cpp b/src/base/preferences.cpp index 54c2a7988..f58557d9d 100644 --- a/src/base/preferences.cpp +++ b/src/base/preferences.cpp @@ -38,6 +38,7 @@ #include #endif +#include #include #include #include @@ -47,12 +48,6 @@ #include #include -#ifndef DISABLE_GUI -#include -#else -#include -#endif - #ifdef Q_OS_WIN #include #endif diff --git a/src/gui/CMakeLists.txt b/src/gui/CMakeLists.txt index ce8c45616..bb3f3f78f 100644 --- a/src/gui/CMakeLists.txt +++ b/src/gui/CMakeLists.txt @@ -1,176 +1,165 @@ set(CMAKE_AUTORCC True) set(CMAKE_AUTOUIC True) -add_library(qbt_gui_headers INTERFACE) -target_include_directories(qbt_gui_headers INTERFACE ${CMAKE_CURRENT_SOURCE_DIR}) +add_library(qbt_gui STATIC + # headers + aboutdialog.h + addnewtorrentdialog.h + advancedsettings.h + autoexpandabledialog.h + banlistoptionsdialog.h + categoryfiltermodel.h + categoryfilterproxymodel.h + categoryfilterwidget.h + cookiesdialog.h + cookiesmodel.h + deletionconfirmationdialog.h + downloadfromurldialog.h + executionlogwidget.h + fspathedit.h + hidabletabwidget.h + ipsubnetwhitelistoptionsdialog.h + lineedit.h + mainwindow.h + optionsdialog.h + previewlistdelegate.h + previewselectdialog.h + private/fspathedit_p.h + private/tristatewidget.h + raisedmessagebox.h + scanfoldersdelegate.h + shutdownconfirmdialog.h + speedlimitdialog.h + statsdialog.h + statusbar.h + tagfiltermodel.h + tagfilterproxymodel.h + tagfilterwidget.h + torrentcategorydialog.h + torrentcontentfiltermodel.h + torrentcontentmodel.h + torrentcontentmodelfile.h + torrentcontentmodelfolder.h + torrentcontentmodelitem.h + torrentcontenttreeview.h + torrentcreatordialog.h + trackerentriesdialog.h + transferlistdelegate.h + transferlistfilterswidget.h + transferlistmodel.h + transferlistsortmodel.h + transferlistwidget.h + tristateaction.h + uithememanager.h + updownratiodialog.h + utils.h + # sources + aboutdialog.cpp + addnewtorrentdialog.cpp + advancedsettings.cpp + autoexpandabledialog.cpp + banlistoptionsdialog.cpp + categoryfiltermodel.cpp + categoryfilterproxymodel.cpp + categoryfilterwidget.cpp + cookiesdialog.cpp + cookiesmodel.cpp + deletionconfirmationdialog.cpp + downloadfromurldialog.cpp + executionlogwidget.cpp + fspathedit.cpp + hidabletabwidget.cpp + ipsubnetwhitelistoptionsdialog.cpp + lineedit.cpp + mainwindow.cpp + optionsdialog.cpp + previewlistdelegate.cpp + previewselectdialog.cpp + private/fspathedit_p.cpp + private/tristatewidget.cpp + raisedmessagebox.cpp + scanfoldersdelegate.cpp + shutdownconfirmdialog.cpp + speedlimitdialog.cpp + statsdialog.cpp + statusbar.cpp + tagfiltermodel.cpp + tagfilterproxymodel.cpp + tagfilterwidget.cpp + torrentcategorydialog.cpp + torrentcontentfiltermodel.cpp + torrentcontentmodel.cpp + torrentcontentmodelfile.cpp + torrentcontentmodelfolder.cpp + torrentcontentmodelitem.cpp + torrentcontenttreeview.cpp + torrentcreatordialog.cpp + trackerentriesdialog.cpp + transferlistdelegate.cpp + transferlistfilterswidget.cpp + transferlistmodel.cpp + transferlistsortmodel.cpp + transferlistwidget.cpp + tristateaction.cpp + uithememanager.cpp + updownratiodialog.cpp + utils.cpp + + # forms + aboutdialog.ui + addnewtorrentdialog.ui + autoexpandabledialog.ui + banlistoptionsdialog.ui + cookiesdialog.ui + deletionconfirmationdialog.ui + downloadfromurldialog.ui + executionlogwidget.ui + ipsubnetwhitelistoptionsdialog.ui + mainwindow.ui + optionsdialog.ui + previewselectdialog.ui + shutdownconfirmdialog.ui + speedlimitdialog.ui + statsdialog.ui + torrentcategorydialog.ui + torrentcreatordialog.ui + trackerentriesdialog.ui + updownratiodialog.ui + + # resources + about.qrc +) + +if (WIN32 OR APPLE) + target_sources(qbt_gui PRIVATE programupdater.h programupdater.cpp) +endif() + +add_subdirectory(log) add_subdirectory(properties) add_subdirectory(powermanagement) add_subdirectory(rss) add_subdirectory(search) -add_library(qbt_gui STATIC -# headers -aboutdialog.h -addnewtorrentdialog.h -advancedsettings.h -autoexpandabledialog.h -banlistoptionsdialog.h -categoryfiltermodel.h -categoryfilterproxymodel.h -categoryfilterwidget.h -cookiesdialog.h -cookiesmodel.h -deletionconfirmationdialog.h -downloadfromurldialog.h -executionlogwidget.h -fspathedit.h -hidabletabwidget.h -ipsubnetwhitelistoptionsdialog.h -lineedit.h -log/logfiltermodel.h -log/loglistview.h -log/logmodel.h -mainwindow.h -optionsdialog.h -previewlistdelegate.h -previewselectdialog.h -private/fspathedit_p.h -private/tristatewidget.h -raisedmessagebox.h -scanfoldersdelegate.h -shutdownconfirmdialog.h -speedlimitdialog.h -statsdialog.h -statusbar.h -tagfiltermodel.h -tagfilterproxymodel.h -tagfilterwidget.h -torrentcategorydialog.h -torrentcontentfiltermodel.h -torrentcontentmodel.h -torrentcontentmodelfile.h -torrentcontentmodelfolder.h -torrentcontentmodelitem.h -torrentcontenttreeview.h -torrentcreatordialog.h -trackerentriesdialog.h -transferlistdelegate.h -transferlistfilterswidget.h -transferlistmodel.h -transferlistsortmodel.h -transferlistwidget.h -tristateaction.h -uithememanager.h -updownratiodialog.h -utils.h - -# sources -aboutdialog.cpp -addnewtorrentdialog.cpp -advancedsettings.cpp -autoexpandabledialog.cpp -banlistoptionsdialog.cpp -categoryfiltermodel.cpp -categoryfilterproxymodel.cpp -categoryfilterwidget.cpp -cookiesdialog.cpp -cookiesmodel.cpp -deletionconfirmationdialog.cpp -downloadfromurldialog.cpp -executionlogwidget.cpp -fspathedit.cpp -hidabletabwidget.cpp -ipsubnetwhitelistoptionsdialog.cpp -lineedit.cpp -log/logfiltermodel.cpp -log/loglistview.cpp -log/logmodel.cpp -mainwindow.cpp -optionsdialog.cpp -previewlistdelegate.cpp -previewselectdialog.cpp -private/fspathedit_p.cpp -private/tristatewidget.cpp -raisedmessagebox.cpp -scanfoldersdelegate.cpp -shutdownconfirmdialog.cpp -speedlimitdialog.cpp -statsdialog.cpp -statusbar.cpp -tagfiltermodel.cpp -tagfilterproxymodel.cpp -tagfilterwidget.cpp -torrentcategorydialog.cpp -torrentcontentfiltermodel.cpp -torrentcontentmodel.cpp -torrentcontentmodelfile.cpp -torrentcontentmodelfolder.cpp -torrentcontentmodelitem.cpp -torrentcontenttreeview.cpp -torrentcreatordialog.cpp -trackerentriesdialog.cpp -transferlistdelegate.cpp -transferlistfilterswidget.cpp -transferlistmodel.cpp -transferlistsortmodel.cpp -transferlistwidget.cpp -tristateaction.cpp -uithememanager.cpp -updownratiodialog.cpp -utils.cpp - -# forms -aboutdialog.ui -addnewtorrentdialog.ui -autoexpandabledialog.ui -banlistoptionsdialog.ui -cookiesdialog.ui -deletionconfirmationdialog.ui -downloadfromurldialog.ui -executionlogwidget.ui -ipsubnetwhitelistoptionsdialog.ui -mainwindow.ui -optionsdialog.ui -previewselectdialog.ui -shutdownconfirmdialog.ui -speedlimitdialog.ui -statsdialog.ui -torrentcategorydialog.ui -torrentcreatordialog.ui -trackerentriesdialog.ui -updownratiodialog.ui -) +if (UNIX AND Qt5DBus_FOUND) + add_subdirectory(qtnotify) + target_link_libraries(qbt_gui PRIVATE Qt5::DBus) +endif() target_link_libraries(qbt_gui PRIVATE - qbt_powermanagement qbt_rss qbt_properties qbt_searchengine qbt_base + PUBLIC + Qt5::Gui Qt5::Widgets ) -target_include_directories(qbt_gui - PRIVATE ../app - PUBLIC ${CMAKE_CURRENT_SOURCE_DIR} -) - -if (UNIX AND Qt5DBus_FOUND) - add_subdirectory(qtnotify) - target_link_libraries(qbt_gui PRIVATE qbt_qtnotify) -endif (UNIX AND Qt5DBus_FOUND) - if (APPLE) target_sources(qbt_gui PRIVATE macutilities.h macutilities.mm) find_package(Qt5 ${requiredQtVersion} REQUIRED COMPONENTS MacExtras) target_link_libraries(qbt_gui PRIVATE Qt5::MacExtras objc) -endif (APPLE) +endif() -if (WIN32 OR APPLE) - target_sources(qbt_gui PRIVATE programupdater.h programupdater.cpp) -endif (WIN32 OR APPLE) - -qbt_target_sources(qBittorrent PRIVATE about.qrc) - -if(WIN32) +if (WIN32) find_package(Qt5 ${requiredQtVersion} REQUIRED COMPONENTS WinExtras) - target_link_libraries(qbt_gui PRIVATE Qt5::WinExtras) -endif(WIN32) + target_link_libraries(qbt_gui PRIVATE Qt5::WinExtras PowrProf) +endif() diff --git a/src/gui/addnewtorrentdialog.cpp b/src/gui/addnewtorrentdialog.cpp index 9380703c5..b57458baf 100644 --- a/src/gui/addnewtorrentdialog.cpp +++ b/src/gui/addnewtorrentdialog.cpp @@ -51,7 +51,7 @@ #include "base/utils/misc.h" #include "base/utils/string.h" #include "autoexpandabledialog.h" -#include "proplistdelegate.h" +#include "properties/proplistdelegate.h" #include "raisedmessagebox.h" #include "torrentcontentfiltermodel.h" #include "torrentcontentmodel.h" diff --git a/src/gui/log/CMakeLists.txt b/src/gui/log/CMakeLists.txt new file mode 100644 index 000000000..e229e4e5a --- /dev/null +++ b/src/gui/log/CMakeLists.txt @@ -0,0 +1,11 @@ +target_sources(qbt_gui PRIVATE + # headers + logfiltermodel.h + loglistview.h + logmodel.h + + #sources + logfiltermodel.cpp + loglistview.cpp + logmodel.cpp +) diff --git a/src/gui/log/loglistview.cpp b/src/gui/log/loglistview.cpp index f17559e62..249334283 100644 --- a/src/gui/log/loglistview.cpp +++ b/src/gui/log/loglistview.cpp @@ -37,8 +37,8 @@ #include #include +#include "gui/uithememanager.h" #include "logmodel.h" -#include "uithememanager.h" namespace { diff --git a/src/gui/mainwindow.cpp b/src/gui/mainwindow.cpp index f29867daf..ac6daf6cd 100644 --- a/src/gui/mainwindow.cpp +++ b/src/gui/mainwindow.cpp @@ -51,7 +51,7 @@ #endif #if (defined(Q_OS_UNIX) && !defined(Q_OS_MACOS)) && defined(QT_DBUS_LIB) #include -#include "notifications.h" +#include "qtnotify/notifications.h" #endif #include "base/bittorrent/session.h" @@ -77,16 +77,17 @@ #include "hidabletabwidget.h" #include "lineedit.h" #include "optionsdialog.h" -#include "peerlistwidget.h" -#include "powermanagement.h" -#include "propertieswidget.h" +#include "powermanagement/powermanagement.h" +#include "properties/peerlistwidget.h" +#include "properties/propertieswidget.h" +#include "properties/trackerlistwidget.h" #include "rss/rsswidget.h" #include "search/searchwidget.h" #include "speedlimitdialog.h" #include "statsdialog.h" #include "statusbar.h" #include "torrentcreatordialog.h" -#include "trackerlistwidget.h" + #include "transferlistfilterswidget.h" #include "transferlistmodel.h" #include "transferlistwidget.h" diff --git a/src/gui/powermanagement/CMakeLists.txt b/src/gui/powermanagement/CMakeLists.txt index 760e5f9c0..fa9abf3d8 100644 --- a/src/gui/powermanagement/CMakeLists.txt +++ b/src/gui/powermanagement/CMakeLists.txt @@ -1,23 +1,8 @@ -add_library(qbt_powermanagement STATIC -# headers -powermanagement.h - -# sources -powermanagement.cpp -) - -target_link_libraries(qbt_powermanagement PUBLIC Qt5::Core) -set_target_properties(qbt_powermanagement PROPERTIES AUTOUIC False AUTORCC False) -target_include_directories(qbt_powermanagement PUBLIC ${CMAKE_CURRENT_SOURCE_DIR}) +target_sources(qbt_gui PRIVATE powermanagement.h powermanagement.cpp) if (UNIX AND Qt5DBus_FOUND) find_package(X11) if (X11_FOUND) - target_sources(qbt_powermanagement PRIVATE powermanagement_x11.h powermanagement_x11.cpp) - target_link_libraries(qbt_powermanagement PRIVATE Qt5::DBus) - endif (X11_FOUND) -endif (UNIX AND Qt5DBus_FOUND) - -if (WIN32) - target_link_libraries(qbt_powermanagement PRIVATE PowrProf) -endif (WIN32) + target_sources(qbt_gui PRIVATE powermanagement_x11.h powermanagement_x11.cpp) + endif() +endif() diff --git a/src/gui/powermanagement/powermanagement.pri b/src/gui/powermanagement/powermanagement.pri index d5834d935..288e7d66d 100644 --- a/src/gui/powermanagement/powermanagement.pri +++ b/src/gui/powermanagement/powermanagement.pri @@ -1,5 +1,3 @@ -INCLUDEPATH += $$PWD - HEADERS += $$PWD/powermanagement.h SOURCES += $$PWD/powermanagement.cpp diff --git a/src/gui/properties/CMakeLists.txt b/src/gui/properties/CMakeLists.txt index a778e3a3c..58fd5b522 100644 --- a/src/gui/properties/CMakeLists.txt +++ b/src/gui/properties/CMakeLists.txt @@ -1,52 +1,38 @@ -add_library(qbt_properties STATIC -# headers -downloadedpiecesbar.h -peerlistdelegate.h -peerlistsortmodel.h -peerlistwidget.h -peersadditiondialog.h -pieceavailabilitybar.h -piecesbar.h -propertieswidget.h -proplistdelegate.h -proptabbar.h -speedplotview.h -speedwidget.h -trackerlistwidget.h -trackersadditiondialog.h +target_sources(qbt_gui PRIVATE + # headers + downloadedpiecesbar.h + peerlistdelegate.h + peerlistsortmodel.h + peerlistwidget.h + peersadditiondialog.h + pieceavailabilitybar.h + piecesbar.h + propertieswidget.h + proplistdelegate.h + proptabbar.h + speedplotview.h + speedwidget.h + trackerlistwidget.h + trackersadditiondialog.h -# sources -downloadedpiecesbar.cpp -peerlistdelegate.cpp -peerlistsortmodel.cpp -peerlistwidget.cpp -peersadditiondialog.cpp -pieceavailabilitybar.cpp -piecesbar.cpp -propertieswidget.cpp -proplistdelegate.cpp -proptabbar.cpp -speedplotview.cpp -speedwidget.cpp -trackerlistwidget.cpp -trackersadditiondialog.cpp + # sources + downloadedpiecesbar.cpp + peerlistdelegate.cpp + peerlistsortmodel.cpp + peerlistwidget.cpp + peersadditiondialog.cpp + pieceavailabilitybar.cpp + piecesbar.cpp + propertieswidget.cpp + proplistdelegate.cpp + proptabbar.cpp + speedplotview.cpp + speedwidget.cpp + trackerlistwidget.cpp + trackersadditiondialog.cpp -# forms -peersadditiondialog.ui -propertieswidget.ui -trackersadditiondialog.ui -) - -target_link_libraries(qbt_properties - PRIVATE - qbt_gui_headers - PUBLIC - qbt_base Qt5::Widgets -) - -target_include_directories(qbt_properties - PRIVATE - ${CMAKE_CURRENT_BINARY_DIR} - PUBLIC - ${CMAKE_CURRENT_SOURCE_DIR} + # forms + peersadditiondialog.ui + propertieswidget.ui + trackersadditiondialog.ui ) diff --git a/src/gui/properties/peerlistwidget.cpp b/src/gui/properties/peerlistwidget.cpp index 4b3107d66..3a51a29d8 100644 --- a/src/gui/properties/peerlistwidget.cpp +++ b/src/gui/properties/peerlistwidget.cpp @@ -52,11 +52,11 @@ #include "base/net/geoipmanager.h" #include "base/net/reverseresolution.h" #include "base/preferences.h" +#include "gui/uithememanager.h" #include "peerlistdelegate.h" #include "peerlistsortmodel.h" #include "peersadditiondialog.h" #include "propertieswidget.h" -#include "uithememanager.h" struct PeerEndpoint { diff --git a/src/gui/properties/properties.pri b/src/gui/properties/properties.pri index ac565e6ed..7670b5e33 100644 --- a/src/gui/properties/properties.pri +++ b/src/gui/properties/properties.pri @@ -1,5 +1,3 @@ -INCLUDEPATH += $$PWD - FORMS += \ $$PWD/peersadditiondialog.ui \ $$PWD/propertieswidget.ui \ diff --git a/src/gui/properties/propertieswidget.cpp b/src/gui/properties/propertieswidget.cpp index e4e89680f..9a16aa258 100644 --- a/src/gui/properties/propertieswidget.cpp +++ b/src/gui/properties/propertieswidget.cpp @@ -51,21 +51,20 @@ #include "base/utils/fs.h" #include "base/utils/misc.h" #include "base/utils/string.h" -#include "autoexpandabledialog.h" +#include "gui/autoexpandabledialog.h" +#include "gui/lineedit.h" +#include "gui/raisedmessagebox.h" +#include "gui/torrentcontentfiltermodel.h" +#include "gui/torrentcontentmodel.h" +#include "gui/uithememanager.h" +#include "gui/utils.h" #include "downloadedpiecesbar.h" -#include "lineedit.h" #include "peerlistwidget.h" #include "pieceavailabilitybar.h" #include "proplistdelegate.h" #include "proptabbar.h" -#include "raisedmessagebox.h" #include "speedwidget.h" -#include "torrentcontentfiltermodel.h" -#include "torrentcontentmodel.h" #include "trackerlistwidget.h" -#include "uithememanager.h" -#include "utils.h" - #include "ui_propertieswidget.h" #ifdef Q_OS_MACOS diff --git a/src/gui/properties/propertieswidget.ui b/src/gui/properties/propertieswidget.ui index 4f8d46e4f..4638e6a73 100644 --- a/src/gui/properties/propertieswidget.ui +++ b/src/gui/properties/propertieswidget.ui @@ -1111,7 +1111,7 @@ TorrentContentTreeView QTreeView -
torrentcontenttreeview.h
+
gui/torrentcontenttreeview.h
diff --git a/src/gui/properties/proptabbar.cpp b/src/gui/properties/proptabbar.cpp index 78babd1d7..c34319493 100644 --- a/src/gui/properties/proptabbar.cpp +++ b/src/gui/properties/proptabbar.cpp @@ -34,7 +34,7 @@ #include #include "base/global.h" -#include "uithememanager.h" +#include "gui/uithememanager.h" PropTabBar::PropTabBar(QWidget *parent) : QHBoxLayout(parent) diff --git a/src/gui/properties/trackerlistwidget.cpp b/src/gui/properties/trackerlistwidget.cpp index 706c0a06e..3a4d57e8b 100644 --- a/src/gui/properties/trackerlistwidget.cpp +++ b/src/gui/properties/trackerlistwidget.cpp @@ -49,10 +49,10 @@ #include "base/bittorrent/trackerentry.h" #include "base/global.h" #include "base/preferences.h" -#include "autoexpandabledialog.h" +#include "gui/autoexpandabledialog.h" +#include "gui/uithememanager.h" #include "propertieswidget.h" #include "trackersadditiondialog.h" -#include "uithememanager.h" #define NB_STICKY_ITEM 3 diff --git a/src/gui/properties/trackersadditiondialog.cpp b/src/gui/properties/trackersadditiondialog.cpp index 92e00d1fc..33c3e1e38 100644 --- a/src/gui/properties/trackersadditiondialog.cpp +++ b/src/gui/properties/trackersadditiondialog.cpp @@ -36,8 +36,8 @@ #include "base/bittorrent/trackerentry.h" #include "base/global.h" #include "base/net/downloadmanager.h" +#include "gui/uithememanager.h" #include "ui_trackersadditiondialog.h" -#include "uithememanager.h" TrackersAdditionDialog::TrackersAdditionDialog(QWidget *parent, BitTorrent::TorrentHandle *const torrent) : QDialog(parent) diff --git a/src/gui/qtnotify/CMakeLists.txt b/src/gui/qtnotify/CMakeLists.txt index 2328dd0ed..d859d85ae 100644 --- a/src/gui/qtnotify/CMakeLists.txt +++ b/src/gui/qtnotify/CMakeLists.txt @@ -1,11 +1 @@ -add_library(qbt_qtnotify STATIC -# headers -notifications.h - -# sources -notifications.cpp -) - -set_target_properties(qbt_qtnotify PROPERTIES AUTOUIC False AUTORCC False) -target_link_libraries(qbt_qtnotify PUBLIC Qt5::DBus) -target_include_directories(qbt_qtnotify PUBLIC ${CMAKE_CURRENT_SOURCE_DIR}) +target_sources(qbt_gui PRIVATE notifications.h notifications.cpp) diff --git a/src/gui/qtnotify/qtnotify.pri b/src/gui/qtnotify/qtnotify.pri index 84d288a4a..c0b99829c 100644 --- a/src/gui/qtnotify/qtnotify.pri +++ b/src/gui/qtnotify/qtnotify.pri @@ -1,5 +1,2 @@ -INCLUDEPATH += $$PWD - HEADERS += $$PWD/notifications.h - SOURCES += $$PWD/notifications.cpp diff --git a/src/gui/rss/CMakeLists.txt b/src/gui/rss/CMakeLists.txt index c09a6e553..0d24c8535 100644 --- a/src/gui/rss/CMakeLists.txt +++ b/src/gui/rss/CMakeLists.txt @@ -1,27 +1,19 @@ -add_library(qbt_rss STATIC -# headers -articlelistwidget.h -automatedrssdownloader.h -feedlistwidget.h -htmlbrowser.h -rsswidget.h +target_sources(qbt_gui PRIVATE + # headers + articlelistwidget.h + automatedrssdownloader.h + feedlistwidget.h + htmlbrowser.h + rsswidget.h -#sources -articlelistwidget.cpp -automatedrssdownloader.cpp -feedlistwidget.cpp -htmlbrowser.cpp -rsswidget.cpp + #sources + articlelistwidget.cpp + automatedrssdownloader.cpp + feedlistwidget.cpp + htmlbrowser.cpp + rsswidget.cpp -# forms -automatedrssdownloader.ui -rsswidget.ui -) - -target_include_directories(qbt_rss PRIVATE ${CMAKE_CURRENT_BINARY_DIR} ${CMAKE_CURRENT_SOURCE_DIR}) -target_link_libraries(qbt_rss - PRIVATE - qbt_gui_headers - PUBLIC - qbt_base Qt5::Gui Qt5::Widgets Qt5::Network + # forms + automatedrssdownloader.ui + rsswidget.ui ) diff --git a/src/gui/rss/automatedrssdownloader.cpp b/src/gui/rss/automatedrssdownloader.cpp index 77feb34e0..846e2c85f 100644 --- a/src/gui/rss/automatedrssdownloader.cpp +++ b/src/gui/rss/automatedrssdownloader.cpp @@ -49,10 +49,10 @@ #include "base/rss/rss_session.h" #include "base/utils/fs.h" #include "base/utils/string.h" -#include "autoexpandabledialog.h" +#include "gui/autoexpandabledialog.h" +#include "gui/uithememanager.h" +#include "gui/utils.h" #include "ui_automatedrssdownloader.h" -#include "uithememanager.h" -#include "utils.h" const QString EXT_JSON {QStringLiteral(".json")}; const QString EXT_LEGACY {QStringLiteral(".rssrules")}; diff --git a/src/gui/rss/automatedrssdownloader.ui b/src/gui/rss/automatedrssdownloader.ui index 1b8a929c1..6d9277d7e 100644 --- a/src/gui/rss/automatedrssdownloader.ui +++ b/src/gui/rss/automatedrssdownloader.ui @@ -454,7 +454,7 @@ Supports the formats: S01E01, 1x1, 2017.01.01 and 01.01.2017 (Date formats also FileSystemPathLineEdit QWidget -
fspathedit.h
+
gui/fspathedit.h
diff --git a/src/gui/rss/feedlistwidget.cpp b/src/gui/rss/feedlistwidget.cpp index a1749d332..537bafca8 100644 --- a/src/gui/rss/feedlistwidget.cpp +++ b/src/gui/rss/feedlistwidget.cpp @@ -38,7 +38,7 @@ #include "base/rss/rss_feed.h" #include "base/rss/rss_folder.h" #include "base/rss/rss_session.h" -#include "uithememanager.h" +#include "gui/uithememanager.h" FeedListWidget::FeedListWidget(QWidget *parent) : QTreeWidget(parent) diff --git a/src/gui/rss/rsswidget.cpp b/src/gui/rss/rsswidget.cpp index 45267a381..288ad2009 100644 --- a/src/gui/rss/rsswidget.cpp +++ b/src/gui/rss/rsswidget.cpp @@ -47,13 +47,13 @@ #include "base/rss/rss_feed.h" #include "base/rss/rss_folder.h" #include "base/rss/rss_session.h" -#include "addnewtorrentdialog.h" +#include "gui/addnewtorrentdialog.h" +#include "gui/autoexpandabledialog.h" +#include "gui/uithememanager.h" #include "articlelistwidget.h" -#include "autoexpandabledialog.h" #include "automatedrssdownloader.h" #include "feedlistwidget.h" #include "ui_rsswidget.h" -#include "uithememanager.h" RSSWidget::RSSWidget(QWidget *parent) : QWidget(parent) diff --git a/src/gui/search/CMakeLists.txt b/src/gui/search/CMakeLists.txt index 88b218cad..d80b420fd 100644 --- a/src/gui/search/CMakeLists.txt +++ b/src/gui/search/CMakeLists.txt @@ -1,33 +1,22 @@ -add_library(qbt_searchengine STATIC -# headers -pluginselectdialog.h -pluginsourcedialog.h -searchjobwidget.h -searchlistdelegate.h -searchsortmodel.h -searchwidget.h +target_sources(qbt_gui PRIVATE + # headers + pluginselectdialog.h + pluginsourcedialog.h + searchjobwidget.h + searchlistdelegate.h + searchsortmodel.h + searchwidget.h -# sources -pluginselectdialog.cpp -pluginsourcedialog.cpp -searchjobwidget.cpp -searchlistdelegate.cpp -searchsortmodel.cpp -searchwidget.cpp + # sources + pluginselectdialog.cpp + pluginsourcedialog.cpp + searchjobwidget.cpp + searchlistdelegate.cpp + searchsortmodel.cpp + searchwidget.cpp -# forms -pluginselectdialog.ui -pluginsourcedialog.ui -searchwidget.ui -) - -set(QBT_SEARCHENGINE_RESOURCES -# search.qrc -) - -target_link_libraries(qbt_searchengine - PUBLIC - qbt_base - PRIVATE - qbt_gui_headers + # forms + pluginselectdialog.ui + pluginsourcedialog.ui + searchwidget.ui ) diff --git a/src/gui/search/pluginselectdialog.cpp b/src/gui/search/pluginselectdialog.cpp index f8c2a16d8..4af236c44 100644 --- a/src/gui/search/pluginselectdialog.cpp +++ b/src/gui/search/pluginselectdialog.cpp @@ -42,12 +42,12 @@ #include "base/global.h" #include "base/net/downloadmanager.h" #include "base/utils/fs.h" -#include "autoexpandabledialog.h" +#include "gui/autoexpandabledialog.h" +#include "gui/uithememanager.h" +#include "gui/utils.h" #include "pluginsourcedialog.h" #include "searchwidget.h" #include "ui_pluginselectdialog.h" -#include "uithememanager.h" -#include "utils.h" enum PluginColumns { diff --git a/src/gui/search/pluginsourcedialog.cpp b/src/gui/search/pluginsourcedialog.cpp index 0921bd8ee..89148ddb8 100644 --- a/src/gui/search/pluginsourcedialog.cpp +++ b/src/gui/search/pluginsourcedialog.cpp @@ -28,8 +28,8 @@ #include "pluginsourcedialog.h" +#include "gui/utils.h" #include "ui_pluginsourcedialog.h" -#include "utils.h" PluginSourceDialog::PluginSourceDialog(QWidget *parent) : QDialog(parent) diff --git a/src/gui/search/searchjobwidget.cpp b/src/gui/search/searchjobwidget.cpp index ebd97c766..ca0707ebe 100644 --- a/src/gui/search/searchjobwidget.cpp +++ b/src/gui/search/searchjobwidget.cpp @@ -47,13 +47,13 @@ #include "base/search/searchpluginmanager.h" #include "base/settingvalue.h" #include "base/utils/misc.h" -#include "addnewtorrentdialog.h" -#include "lineedit.h" +#include "gui/addnewtorrentdialog.h" +#include "gui/lineedit.h" +#include "gui/uithememanager.h" +#include "gui/utils.h" #include "searchlistdelegate.h" #include "searchsortmodel.h" #include "ui_searchjobwidget.h" -#include "uithememanager.h" -#include "utils.h" SearchJobWidget::SearchJobWidget(SearchHandler *searchHandler, QWidget *parent) : QWidget(parent) diff --git a/src/gui/search/searchwidget.cpp b/src/gui/search/searchwidget.cpp index f00296543..af12f85cf 100644 --- a/src/gui/search/searchwidget.cpp +++ b/src/gui/search/searchwidget.cpp @@ -46,11 +46,11 @@ #include "base/search/searchhandler.h" #include "base/search/searchpluginmanager.h" #include "base/utils/foreignapps.h" -#include "mainwindow.h" +#include "gui/mainwindow.h" +#include "gui/uithememanager.h" #include "pluginselectdialog.h" #include "searchjobwidget.h" #include "ui_searchwidget.h" -#include "uithememanager.h" #define SEARCHHISTORY_MAXSIZE 50 #define URL_COLUMN 5 diff --git a/src/gui/search/searchwidget.ui b/src/gui/search/searchwidget.ui index 51029f8f6..109632f43 100644 --- a/src/gui/search/searchwidget.ui +++ b/src/gui/search/searchwidget.ui @@ -141,7 +141,7 @@ Click the "Search plugins..." button at the bottom right of the window LineEdit QLineEdit -
lineedit.h
+
gui/lineedit.h