Commit Graph

370 Commits

Author SHA1 Message Date
Martchus b77270eaa7 Update translations 2020-12-01 18:48:47 +01:00
Martchus 9bc3555c99 Resolve QT_INSTALL_TRANSLATIONS via CMAKE_PREFIX_PATH if it is relative
The variables provided by Qt 6 might just contain a relative path. This
change adds an extra function resolve these via CMAKE_PREFIX_PATH and
CMAKE_FIND_ROOT_PATH.
2020-11-11 18:51:19 +01:00
Martchus d80302d20d Make list of Qt's translations even if not available at build time
We shouldn't require translations to be installed at build time to know for
which repositories translations need to be loaded at runtime.
2020-11-11 18:11:43 +01:00
Martchus d61f32a635 Allow to disable built-in translations for Qt's own translations 2020-11-11 18:08:02 +01:00
Martchus b7c3416c37 Add qt6ct to auto-completion of platform theme argument 2020-11-07 22:09:25 +01:00
Martchus 0a67d7dc15 Avoid hard-coding Qt version 2020-11-07 22:05:54 +01:00
Martchus 0f05beebd8 Cope with CMAKE_FIND_ROOT_PATH containing more than one path
According to the documentation CMAKE_FIND_ROOT_PATH is a list.
2020-11-07 22:02:10 +01:00
Martchus f59c2cb643 Fix detecting QXcbIntegrationPlugin
The variable QT5_Gui_STATIC_PREFIX is no longer used.
2020-11-07 21:58:54 +01:00
Martchus 09ff2d00b1 Replace META_QT5_VERSION with version-agnostic META_QT_VERSION 2020-11-07 21:38:18 +01:00
Martchus deb9b4467f Look for Svg plugins within the Gui module's directory as well
In Qt 5  these plugins were loaded as part of the Svg module (at least with
my patches). With Qt 6 (for which I've dropped my patches) we need to
include the plugin's config file manually.
2020-11-07 21:38:18 +01:00
Martchus 62df4284da Update patch version 2020-11-07 21:38:18 +01:00
Martchus 89152bdbe9 Fix passing arguments when configuring Qt plugins 2020-11-03 18:32:35 +01:00
Martchus 75b992bfd1 Don't install translations if built-in anyways 2020-10-30 22:45:56 +01:00
Martchus 4f06492306 Apply cmake-format 2020-10-10 00:50:40 +02:00
Martchus 7d78fb7236 Apply clang-format 2020-10-05 18:37:42 +02:00
Martchus 15c884153a Allow building for Android with latest NDK, Qt 5 and CMake
* Making an Android APK should now generally work with NDK r21.d and
  Qt 5.15.1 and CMake 3.18 although some details might still need tweaking
* It is now supposed to be used within the NDK's toolchain instead of
  CMake's built-in Android support (which makes problems with newer NDK
  versions)
* The old way to lookup/pass variables is preserved so it should still
  work with older Qt versions and CMake's built-in Android support
* Qt's own support for invoking androiddeployqt needed to be disabled
  because it lead to CMake errors (see comment)
2020-10-05 18:37:23 +02:00
Martchus 429ec48a6e Adapt to Qt 6 (757a9c21c1)
* Don't use deprecated QLibraryInfo::path()
* Avoid conflicting QT_FORWARD_DECLARE_CLASS(QStringList)
2020-09-18 18:28:35 +02:00
Martchus 51ca0e895c Avoid using functions and enum items deprecated in Qt 6 2020-09-15 18:10:15 +02:00
Martchus 15075df0ca Remove overspecification of Qt version in documentation and comments 2020-09-04 01:19:20 +02:00
Martchus cb3a4960e7 Support Qt 6 (commit 174154b) 2020-09-04 00:44:48 +02:00
Martchus 4757b0a8b7 Avoid using qEnvironmentVariable() for compat with Qt < 5.10 2020-07-29 11:49:02 +02:00
Martchus 65a532d80c Apply clang-format 2020-07-12 21:18:00 +02:00
Martchus 56cf474231 Enable High-DPI scaling by default in all my Qt applications 2020-07-12 21:15:48 +02:00
Martchus abfcd9f8be Update translations 2020-07-07 12:14:48 +02:00
Martchus 53e55d7054 Add tests for D-Bus notifications 2020-06-23 02:00:00 +02:00
Martchus 37bbad572d Avoid duplicate notifications when show() is called again very fast 2020-06-23 01:59:31 +02:00
Martchus 956409bb38 Do not rely on presence of icon themes in tests 2020-06-16 01:18:23 +02:00
Martchus 2598c0f5ae Add basic test for settings dialog 2020-06-16 00:35:15 +02:00
Martchus 5a7eaf8d1b Add tests for ButtonOverlay widgets 2020-06-16 00:17:24 +02:00
Martchus 106ac4c57e Improve behavior of ButtonOverlay
* Remove all existing actions when falling back to using a custom layout to
  prevent duplicating those buttons
* Enable clear button of ClearComboBox by default for consistency with
  other widgets
2020-06-16 00:16:52 +02:00
Martchus ee9ec87386 Resolve TODO regarding QCursor::pos() 2020-06-14 15:53:45 +02:00
Martchus 793bd00cb6 Avoid repeating default pixmap size of IconButton all over the place 2020-06-14 14:56:03 +02:00
Martchus 8ee82c9a3c Fix initializing alignment; this shouldn't use nullptr 2020-06-11 21:49:21 +02:00
Martchus ee7539cf6e Allow adding custom actions to button overlay
Of course it would is possible to add actions directly to the line edit.
These new helper functions have the advantage that they provide a fallback
to the old button overlay implementation in case line edit actions can not
be used.
2020-06-09 23:24:24 +02:00
Martchus 5974690006 Use QLineEdit's functions to implement ButtonOverlay functions if possible 2020-06-09 22:03:26 +02:00
Martchus 7db2fd02fc Improve button overlay so buttons will not be shown over e.g. spin box buttons
* Unify/streamline code
* Use Qt::SC_ComboBoxEditField/Qt::SC_SpinBoxEditField to determine the edit
  area for better compatibility accorss various styles
2020-06-04 19:13:14 +02:00
Martchus 9b7ad3375c Avoid hard-coding Qt version in function invocations
* Make use of "Version-less CMake targets", see
  https://www.qt.io/blog/versionless-cmake-targets-qt-5.15
* Keep fallbacks for compatibility with Qt < 5.15
* Remove some other occurrences of hard-coded Qt versions
2020-04-27 23:47:08 +02:00
Martchus 4e974d2258 Prevent restoring invalid/removed IDs of ChecklistModel
The restore function should not add new IDs to the model.
2020-04-24 23:06:56 +02:00
Martchus 6e734159c6 Update translations 2020-03-17 20:04:36 +01:00
Martchus 54e8ef75cd Fix comments mentioning qtconfig.h
There is a separate Qt-specific header since v6.
2020-03-17 19:56:32 +01:00
Martchus d33cf13923 Apply cmake-format 2020-03-08 13:51:36 +01:00
Martchus 660625d1e7 Don't use lower-case Qt macros 2020-03-08 13:07:31 +01:00
Martchus 4ce6bb9487 Don't delete DBusNotification on error
Not sure why the deletion was done at this point in the
first place. DBusNotification objects are not even created
using 'new' by Syncthing Tray so this can never make any
sense.
2020-03-01 20:44:01 +01:00
Martchus 031378e1c5 Fix remaining install dirs to use GNUInstallDirs consistently 2020-02-13 11:43:29 +01:00
Martchus fc76422d01 Use GNUInstallDirs
See https://github.com/Martchus/cpp-utilities/issues/17
2020-02-01 00:01:37 +01:00
Martchus 6874917c5d Use consistent order for visibility attribute 2020-01-29 18:33:27 +01:00
Martchus e55ae3686b Require CMake 3.3.0 in all modules 2020-01-10 18:01:27 +01:00
Martchus 358a7341b0 Fix support for Qt < 5.14.0 2019-12-16 16:52:35 +01:00
Martchus 67165b69d7 Don't use toSet() method which was deprecated in Qt 5.14.0 2019-12-15 19:29:03 +01:00
Martchus ca081697df Reformat CMake scripts against cmake-format 0.6.3 2019-12-15 19:27:26 +01:00