Commit Graph

51 Commits

Author SHA1 Message Date
Martchus 4c32a60551 Remove duplicated lookup in `loadApplicationTranslationFile()` 2023-07-03 22:00:42 +02:00
Martchus 8fd1452174 Allow clearing previously installed translation files 2023-07-01 23:43:27 +02:00
Martchus 8642f14bb1 Apply clang-format and cmake-format 2023-03-25 18:50:08 +01:00
Martchus fd151995ce Adapt to dark mode support in Qt 6.5
* Avoid setting platform setting in Qt 6.5 as it is no longer needed for
  dark Window frames
* Reference recent blog post
* Add real `isDarkModeEnabled()` function using new Qt 6.5 API (as existing
  `isPaletteDark()` function is only based on the current palette)
2023-03-13 20:59:57 +01:00
Martchus 368c9e9b0e Add function to return an error message for a `QSettings` object 2023-02-17 19:17:17 +01:00
Martchus c9fcf52e40 Add comments for the tweaks in `setupCommonQtApplicationAttributes()` 2022-09-05 23:25:04 +02:00
Martchus b6701ef837 Enable dark window frame on Windows if configured color palette is dark 2022-09-05 23:22:13 +02:00
Martchus e3e2d24aeb Add `getSettings()` to streamline settings locations in my apps
* Keep handling for old location of settings file
* Add handling to allow portable settings (see
  https://github.com/Martchus/tageditor/issues/88)
2022-08-20 16:16:40 +02:00
Martchus b709ab887f Default-initialize FONTCONFIG_PATH if not set
Fixes font loading in some environments
2022-05-02 00:55:07 +02:00
Martchus d771646af3 Set `Qt::AA_EnableHighDpiScaling` only before QGuiApplication is constructed
Otherwise it is too late anyways and Qt might print a warning.
2021-11-04 00:10:13 +01:00
Martchus 55341a7305 Prevent memory leaks found via valgrind 2021-03-23 16:46:55 +01:00
Martchus 7d78fb7236 Apply clang-format 2020-10-05 18:37:42 +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 56cf474231 Enable High-DPI scaling by default in all my Qt applications 2020-07-12 21:15:48 +02:00
Martchus 1f08721dda Remove ConfigFile::locateConfigFile()
Needed adjustments to support the config suffix feature. Since it
is only used by videodownloader it can be dropped.
2019-08-20 22:16:38 +02:00
Martchus 6b510b21e7 Add missing quote when logging translation lookup 2019-08-10 00:10:16 +02:00
Martchus a40d2974e0 Fix translation lookup if config name is set
In this case the config name must only be appended to the applications
config directory but *not* to the name of the translation file itself.
2019-08-07 22:57:17 +02:00
Martchus 2dc2e6f4c2 Prevent crash by instantiating QString explicitely 2019-06-17 00:43:44 +02:00
Martchus 7e8766cdb6 Allow to debug locating of translations 2019-06-16 16:56:38 +02:00
Martchus b3e7c390d9 Have everything in one top-level namespace 2019-06-10 21:57:46 +02:00
Martchus 72d0e9e6e0 Adapt search path for translations to new config system 2019-05-05 18:37:24 +02:00
Martchus 4de0685c84 Apply clang-format 2019-05-04 21:01:18 +02:00
Martchus 850101dce6 Support installing multiple configurations within the same prefix 2019-05-03 01:03:41 +02:00
Martchus 571c2f8a26 Fix missing #includes 2018-06-05 22:49:17 +02:00
Martchus c8f55a72b3 Apply clang-format from LLVM 6 2018-03-24 17:03:46 +01:00
Martchus afe3373896 Apply tidy after updating to clang-format 5.0.0
The behavior of clang-format slightly changed in Clang 5.0.0:
http://releases.llvm.org/5.0.0/tools/clang/docs/ReleaseNotes.html#clang-format
2017-09-17 21:45:49 +02:00
Martchus 39cb21b5a9 Use QStringBuilder consistently in resources.cpp 2017-09-07 17:32:07 +02:00
Martchus cdd84520da Prevent warnings when English translations can not be load
English translation files are built-in and usually only used
for plural forms. Hence the files are often empty and the
warnings about them are more misleading than helpful most of
the time.

TODO: Find a way to distinguish between translations
which are supposed to be empty and missing/invalid
translations.
2017-08-15 01:08:08 +02:00
Martchus 0599eb354d Apply clang-format 2017-05-04 22:46:37 +02:00
Martchus 2dcbc02f4b Apply clang-format 2017-05-01 03:16:25 +02:00
Martchus 61a544d42f Make definitions for gui support project specific 2017-04-27 22:03:37 +02:00
Martchus bd5c30c582 Update doc about functions to load translation 2017-03-06 22:08:45 +01:00
Martchus 8f2e3f0476 Add macro to auto init resources of static deps
Generated macro code is made available via config
header implemented in c++utilities
2017-02-11 02:04:12 +01:00
Martchus aca86b0681 Load translations of dependencies, too 2017-01-07 16:09:38 +01:00
Martchus 58d762b7ee Improve error message in loadApplicationTranslationFile() 2016-10-05 23:00:51 +02:00
Martchus de98b88f4a Improve Qt settings
Setting font and icon theme doesn't work yet, not sure
about locale
2016-08-14 22:44:25 +02:00
Martchus b5bd368c5c Load translations also for Qt modules not in qtbase 2016-07-27 21:52:01 +02:00
Martchus 30f53e819c Fix loading ressources
Still TODO: Load translations for modules not in qtbase
2016-07-27 18:52:59 +02:00
Martchus 5a0eba3726 Allow built-in translations and icons
- Allow to built-in qm files for translations
  using the Qt resource system
- Allow to built-in required icons from specified
  icon themes using the Qt resource system
- Provide bash script to determine required icons
2016-07-16 23:12:02 +02:00
Martchus 9137a63462 Improve documentation 2016-06-10 23:05:43 +02:00
Martchus 10726b4dee also update TS files via CMake 2016-04-24 20:53:14 +02:00
Martchus 8b4574de97 fixed #ifdef 2015-09-22 01:53:38 +02:00
Martchus ba77d0315b add method to locate additional config files 2015-09-16 17:30:25 +02:00
Martchus 721e79d027 fixed includes 2015-09-06 20:19:21 +02:00
Martchus 4047cdd14f updated application startup 2015-09-01 20:08:43 +02:00
Martchus 7ba1b2ba58 changed translation file lookup 2015-08-25 19:16:43 +02:00
Martchus e5b84fb8d0 always add English as fallback language
search in ./projects/appname/translations as well (used when building
subdirs projects)
2015-08-08 01:38:48 +02:00
Martchus 97bc020524 delete unused translator on failure 2015-07-14 18:33:44 +02:00
Martchus 576b0c11c6 using "en_US" as fallback language 2015-06-21 21:45:58 +02:00