Commit Graph

225 Commits

Author SHA1 Message Date
Jarek Kobus
7a14e38b7e Explilitly ignore the return value of QTranslator::load()
Otherwise we are getting warning about unused return type
of function marked with [[nodiscard]].

Change-Id: I07b464cc641ff1b6e36a0c84115deed1701e40d3
Reviewed-by: Eike Ziller <eike.ziller@qt.io>
2020-11-13 11:07:13 +00:00
Jarek Kobus
1fd7e9b242 Get rid of setting deprecated attributes in Qt 6
Setting AA_EnableHighDpiScaling and AA_UseHighDpiPixmaps
attributes does nothing in Qt 6.

Change-Id: I1744604f34294d809c594c66ef86b610ed6efb16
Reviewed-by: Eike Ziller <eike.ziller@qt.io>
2020-11-13 11:07:07 +00:00
Morten Johan Sørvig
9c09d82251 Limit workaround to 5.14.0
QTBUG-80934 was fixed in Qt 5.14.1.

Change-Id: I3f9f2a629bce40b13ad8836ae4b0f4a710241d49
Reviewed-by: Eike Ziller <eike.ziller@qt.io>
2020-09-03 11:26:33 +00:00
hjk
7dfa4acfb7 App: Restrict use of Qt::AA_DisableWindowContextHelpButton to Qt 5
Gone afterwards.

Change-Id: I8c7009658844a5979b144c108736055ed11bec05
Reviewed-by: Eike Ziller <eike.ziller@qt.io>
2020-06-19 10:25:22 +00:00
Christian Kandeler
b9e79f7852 Linux: Force release of unused memory
Apparently, glibc uses an overly aggressive caching strategy, causing
Creator to accumulate an unreasonable amount of resident memory over
time.
We deal with this by manually forcing glibc to free unused memory once a
minute, provided the application is actually in use.

Fixes: QTCREATORBUG-22832
Change-Id: I300eafd8714eb7e49774129758998db32ca1a1de
Reviewed-by: hjk <hjk@qt.io>
2020-05-11 08:33:14 +00:00
hjk
2a664afaa1 App: Add mechanism to not propagate LD_PRELOAD
LD_PRELOAD is useful e.g. to preload custom malloc implementations
for profiling purposes. At times, it makes sense to not propagate
that to spawned child processes. This here allows to prevent that
by setting another variable, QTC_DO_NOT_PROPAGATE_LD_PRELOAD, in
the environment.

Change-Id: Ib8944685488a18a651d351b8a64dd8d7a7e48837
Reviewed-by: Eike Ziller <eike.ziller@qt.io>
2020-04-30 08:01:21 +00:00
Eike Ziller
d6c95ef365 Take compatibility version into account for user plugins
When loading user-local plugins, do not load plugins for all patch
versions starting from .0 unconditionally. Take the compatibility
version into account.

That fixes that prereleases x.y.82 etc should not try loading plugins
for any actual x.y.z release.

Change-Id: Ide0931bbdef4f48e08dcc3213f7c193c8889fb0f
Reviewed-by: Christian Kandeler <christian.kandeler@qt.io>
2020-03-06 09:49:05 +00:00
Kai Koehne
fda9955df0 Globally disable WindowContextHelpButtonHint
Do set the global application flag AA_DisableWindowContextHelpButton
to avoid having to unset the default WindowContextHelpButtonHint
in every single dialog.

AA_DisableWindowContextHelpButton was added in Qt 5.10.

Change-Id: I21fe8bc5ddfa4c01ec7a799b04bfb6ff1c9d6d86
Reviewed-by: Eike Ziller <eike.ziller@qt.io>
2020-02-25 13:26:44 +00:00
hjk
edbdb4436c App/aggregation: Some modernization
Change-Id: I390e81122453d20a646af4a5bf08edf9de0d9db5
Reviewed-by: Eike Ziller <eike.ziller@qt.io>
2020-02-14 09:41:26 +00:00
Eike Ziller
392b063fe8 Guard against crashing plugins
If a plugin crashes, ask the user if that plugin should be disabled.
For this track which plugin currently is changing its state. Remove that
information if the state change was successful.
At startup check if there is a plugin for which we wrote, but not
removed that information.

This is especially interesting if the user installed 3rdparty plugins.

Change-Id: I5729aa5c786b653d5bd53304f4fbeaca35ec9e71
Reviewed-by: Leena Miettinen <riitta-leena.miettinen@qt.io>
Reviewed-by: Alessandro Portale <alessandro.portale@qt.io>
2020-01-20 10:39:28 +00:00
hjk
8b4915ce41 App: Make compile
Amends 7c35c447e1.

Change-Id: I92af20bb4d9e23c91fc43a0c3388a6cf1cdec5a5
Reviewed-by: Christian Stenger <christian.stenger@qt.io>
Reviewed-by: Eike Ziller <eike.ziller@qt.io>
2020-01-14 09:15:45 +00:00
Eike Ziller
7c35c447e1 Set application details earlier
The application details (name, organization, etc) were only set during
Core plugin startup, but that is too late for e.g. the plugin manager.

Change-Id: Id47d79e38dec9e586ab7b91a3080101e5fecb20d
Reviewed-by: Tim Jenssen <tim.jenssen@qt.io>
2020-01-14 08:16:52 +00:00
Eike Ziller
be19b00289 Provide "Restart Now" functionality
And use it for the plugin dialog and when changing the UI language.

Change-Id: Ic767837d2526409f7ec46d7e4612a1499f19459e
Reviewed-by: hjk <hjk@qt.io>
Reviewed-by: David Schulz <david.schulz@qt.io>
2020-01-07 12:46:59 +00:00
Eike Ziller
4a00f53c17 Work around high DPI issues on Windows
Task-number: QTBUG-80934
Change-Id: I4b7dbe7157145db3a9feee83f32be3babaca5ab9
Reviewed-by: David Schulz <david.schulz@qt.io>
2020-01-03 07:53:24 +00:00
Orgad Shaneh
d73632c6f3 Main: Remove unused include
Change-Id: Ifeef80bfc6465c5544118a74e774a5442c4f8374
Reviewed-by: hjk <hjk@qt.io>
2019-10-22 13:27:27 +00:00
Eike Ziller
ac014e3875 Merge remote-tracking branch 'origin/4.10' into 4.11
Conflicts:
	src/plugins/projectexplorer/projectnodes.h

Change-Id: I10a749cca38c2d0929cf4d2b74ab089e14b6157b
2019-10-02 07:32:57 +02:00
Elvis Angelaccio
85fcd10f90 Show application icon in Plasma Wayland sessions
kwin_wayland fetches application icons from .desktop files, so we
need to set the desktop filename on the QGuiApplication instance
(otherwise kwin will set a generic wayland icon as fallback).

Change-Id: I89921ace4a5a4ff2a2387111e51a8914f58e44a8
Reviewed-by: Eike Ziller <eike.ziller@qt.io>
2019-10-01 07:02:35 +00:00
hjk
2e14df7561 Some clang-tidy -use-modernize-nullptr
Change-Id: I1bed5e85a5b7948d08502a72a10f80baa075c204
Reviewed-by: Thomas Hartmann <thomas.hartmann@qt.io>
2019-08-01 13:20:26 +00:00
Christian Kandeler
4d71c0f13e Let users disable environment entries
It's helpful to be able to temporarily disable environment variables, as
opposed to having to remove (and then re-add) them entirely.

Fixes: QTCREATORBUG-20984
Change-Id: Ib0d287035b9357507c4c19faaf3a1517382506b5
Reviewed-by: hjk <hjk@qt.io>
2019-07-22 14:31:01 +00:00
Tim Jenssen
3ae169f8ac improve installsettingspath error message
Change-Id: Iefd301009faad8a15e9a1b99b0a52bce34eae654
Reviewed-by: Eike Ziller <eike.ziller@qt.io>
2019-07-17 13:21:39 +00:00
Tim Jenssen
dfd9d5a5ee try only show MessageBoxes if that is possible
Change-Id: I70f41b7a2936d6797895559530050e8de54b2913
Reviewed-by: Eike Ziller <eike.ziller@qt.io>
2019-07-17 12:16:28 +00:00
hjk
473a741c9f Utils: Rename FileName to FilePath
More in line with QFileInfo terminonlogy which appears to be
best-of-breed within Qt.

Change-Id: I1d051ff1c8363ebd4ee56376451df45216c4c9ab
Reviewed-by: Christian Kandeler <christian.kandeler@qt.io>
2019-05-28 12:23:26 +00:00
Eike Ziller
e0b0a08e50 ExtensionSystem: Move away from QList
Qt 6 API will move away from it.
Use QVector for API and some std container for internal things.

Change-Id: Iff14d48a47d5ac52ade875d9c8c84ad8a4f577d8
Reviewed-by: hjk <hjk@qt.io>
2019-05-27 14:21:00 +00:00
Eike Ziller
cb1043ae16 Load user-plugins from earlier patch releases
Qt Creator X.Y.Z is binary compatible with X.Y.(Z-1) so load plugins
from these user plugin directories too.

Change-Id: Ibed7f54e84864337a69a4745fb1ecd2f78907486
Reviewed-by: hjk <hjk@qt.io>
Reviewed-by: Eike Ziller <eike.ziller@qt.io>
2019-05-13 06:46:54 +00:00
hjk
5a37385852 App: Fix typo in the -temporarycleansettings description
And mention the option in the ChangeLog.

Change-Id: I7cce04ec1ad8b3f89b4a4f6c24f2a8d2da9381a0
Reviewed-by: André Hartmann <aha_1980@gmx.de>
Reviewed-by: Leena Miettinen <riitta-leena.miettinen@qt.io>
Reviewed-by: Eike Ziller <eike.ziller@qt.io>
2019-03-18 12:03:56 +00:00
hjk
b96bd8b19d App: Add a -temporarycleansettings (-tcs) command line option
For people that are too lazy to think about currently unused
throw-away temporary directory names.

Change-Id: I0c52f3ea2b0dac4ef6cf3f9db646fd5107fa7977
Reviewed-by: Eike Ziller <eike.ziller@qt.io>
2019-03-18 11:27:20 +00:00
Robert Loehning
4032f6383a Fix frequent typo
can not -> cannot

Change-Id: Ie872ada1bc9b4ed64bffb667c2e44dbb13b4ad11
Reviewed-by: Leena Miettinen <riitta-leena.miettinen@qt.io>
2018-10-23 09:30:20 +00:00
Orgad Shaneh
bdc2b4b59f Remove hard-coded disabling of debug logs
Instead, set the default level of all logs to QtWarningMsg.

The call to setFilterRules overrides the user preferences in qtlogging.ini.

Change-Id: Id5f6cd550d14ff7f45ae04c5d3110e0bafb0f072
Reviewed-by: Eike Ziller <eike.ziller@qt.io>
Reviewed-by: Kai Koehne <kai.koehne@qt.io>
Reviewed-by: hjk <hjk@qt.io>
2018-10-13 16:36:58 +00:00
Eike Ziller
d35638df56 Do not modify environment for user applications
We used to set QT_OPENGL, currently set LD_LIBRARY_PATH when qtcreator.sh
is used, and might set other variables in the future,
but these environment modifications should not be passed on
to user applications or when we run tools that are not shipped with
Qt Creator.

For LD_LIBRARY_PATH there already was a hack for
Environment::systemEnvironment.

For environment variables that we might set in main()
in the future, this patch caches the system environment for
Environment::systemEnvironment early before any modifications are made.

The previous hack for LD_LIBRARY_PATH no longer works, since it
used QCoreApplication::applicationDirPath() which cannot be used at that
point in time (before the QApplication has been created). Instead pass
the correct user LD_LIBRARY_PATH directly from qtcreator.sh to
Qt Creator through a command line option, which is cleaner anyhow.

Task-number: QTCREATORBUG-20808
Change-Id: I6674a5e0537e1b37fd7dcbff371b542fa24bce69
Reviewed-by: Ulf Hermann <ulf.hermann@qt.io>
Reviewed-by: Oswald Buddenhagen <oswald.buddenhagen@qt.io>
Reviewed-by: Tobias Hunger <tobias.hunger@qt.io>
2018-08-21 08:48:21 +00:00
Thomas Hartmann
7d5013cefd Use Qt::AA_UseOpenGLES instead of QT_OPENGL
Environment variables are passed on to user applications,
and we should avoid forcing ANGLE on these.

Task-number: QTCREATORBUG-20808
Change-Id: Ia6663e4e2bc4f78ec053d100563a0f07d47092be
Reviewed-by: Eike Ziller <eike.ziller@qt.io>
2018-08-15 10:46:46 +00:00
Eike Ziller
af59639826 App: centralize conversion from local8Bit
Change-Id: I8def56fa3b613ba32dad69a2997b190fa76cab3c
Reviewed-by: Tobias Hunger <tobias.hunger@qt.io>
2018-06-08 06:49:14 +00:00
Eike Ziller
93d35399b5 App: Pull special command line parsing into separate function
Change-Id: I143aa3f49b3e9fb5a1aa30cf9c9364c61b95ced4
Reviewed-by: Tobias Hunger <tobias.hunger@qt.io>
2018-06-08 06:48:22 +00:00
Thomas Hartmann
1bd967badb Avoid parsing the commandline arguments twice
We parse the arguments independently from QApplication
and initialize the settings before we create QApplication.

Therefore we can parse any setting before creating
QApplication which is required for high DPI support.

We use the QApplication argument parsing to filter out Qt
specific commandline arguments like style.

Change-Id: I83ead87476d99351de6fe4f86c96c39a721af47b
Reviewed-by: Eike Ziller <eike.ziller@qt.io>
2018-04-13 12:18:13 +00:00
Thomas Hartmann
7160b83589 Allow to disable or enable high DPI scaling
An option is added to the Options dialog:

* Allow to enable high DPI scaling on Linux
* Allow to disable high DPI scaling on Windows

On macOS+retina, high DPI scaling applied automatically
and we do not show the option on macOS.

I had to duplicate the logic for parsing -settingspath,
because the code has to run before QApplication is created.

Task-number: QTCREATORBUG-20232
Change-Id: I4e94fc54391fe99e30d4778ec2a178529961eed7
Reviewed-by: Alessandro Portale <alessandro.portale@qt.io>
2018-04-10 16:28:35 +00:00
Thomas Hartmann
2407792d0d Use angle on Windows
Many OpenGL drivers are still very unstable and we see many issues.

Task-number: QTCREATORBUG-20067
Change-Id: Ifc1d5b2666f9cc69154032c3c4534cd96194110c
Reviewed-by: Eike Ziller <eike.ziller@qt.io>
Reviewed-by: Alessandro Portale <alessandro.portale@qt.io>
2018-03-19 08:27:25 +00:00
Leena Miettinen
631d9cd711 UI text: Fix grammar
Change-Id: I39fd5db51e3228de34c028993416f66fce9962da
Reviewed-by: Robert Loehning <robert.loehning@qt.io>
2018-02-07 09:29:46 +00:00
Eike Ziller
1e77f48251 Fix that translations did not work after setting IDE_ID
We currently do not actually rename any resources.

Change-Id: I4ebaa4924d6358af63dca7611e64fe53835252d6
Reviewed-by: Tim Jenssen <tim.jenssen@qt.io>
2018-01-10 15:36:23 +00:00
Robert Loehning
e07bf2f682 Make missing uses of IDE name configurable
Change-Id: Ie89293b80adfacea19bcb949e4524f16fbb223f9
Reviewed-by: Eike Ziller <eike.ziller@qt.io>
Reviewed-by: Alessandro Portale <alessandro.portale@qt.io>
2018-01-03 10:26:24 +00:00
Tim Jenssen
75b77fea33 fix getting a warning if no installsettingspath is set
Change-Id: I6f5528026a6fd7c1f3df683c7d0816a82e592efc
Reviewed-by: Thomas Hartmann <thomas.hartmann@qt.io>
2017-11-17 17:32:20 +00:00
Tim Jenssen
d0a44fa4e2 introduce installsettingspath as an argument
Change-Id: I2435ddd09e25a73bd70efe847990dcfc57b8680e
Reviewed-by: Leena Miettinen <riitta-leena.miettinen@qt.io>
Reviewed-by: Tim Jenssen <tim.jenssen@qt.io>
2017-11-17 16:26:53 +00:00
Donald Carr
bf464875f6 Restrict Unity workaround to Unity session
Allow explicit native menubar disabling as there are platforms with
known broken implementations.

Change-Id: Ice5fb1270969b422eb1a964fab5e305bc658c667
Reviewed-by: Orgad Shaneh <orgads@gmail.com>
Reviewed-by: André Hartmann <aha_1980@gmx.de>
Reviewed-by: Eike Ziller <eike.ziller@qt.io>
2017-10-16 09:38:07 +00:00
Tobias Hunger
4ef01c961e app_version.h: Make IDE name configurable
Change-Id: I993f452c8d09cf89e9a2958fc8e36b7d2c17ee6f
Reviewed-by: Leena Miettinen <riitta-leena.miettinen@qt.io>
Reviewed-by: Tobias Hunger <tobias.hunger@qt.io>
2017-09-05 10:19:48 +00:00
Marco Bubke
4beaae0f79 Introduce Breakpad crash handler
Google Breakpad (https://chromium.googlesource.com/breakpad/breakpad) is a
widely used crash handler framework, e.g. by Mozilla and Chromium. It is
providing a platform neutral solution to generate mini dumps, collect
debug information and generate stack traces from those.

Done-with: Orgad Shaneh <orgad.shaneh@audiocodes.com>
Change-Id: I09382e7db0dc9e29b228e7b554fda7b6f5684349
Reviewed-by: Orgad Shaneh <orgads@gmail.com>
Reviewed-by: Tim Jenssen <tim.jenssen@qt.io>
2017-07-25 14:24:11 +00:00
Orgad Shaneh
d294f91758 main: Remove unused variable
This amends commit a6c17fc537.

Change-Id: I365513a9e11e6c07310799f87a4e299cd110dcf3
Reviewed-by: Alessandro Portale <alessandro.portale@qt.io>
2017-07-11 20:28:26 +00:00
Orgad Shaneh
2a197ed9bf Revert "App: (Re-)enable automatic HighDPI scaling for Linux"
It breaks running over PuTTY with VcxSrv.

This reverts commit 36c8227caf.

Task-number: QTCREATORBUG-18467
Change-Id: Id93497ee24cdb574d1e4a1ac1b0fb112012a695d
Reviewed-by: Eike Ziller <eike.ziller@qt.io>
Reviewed-by: Alessandro Portale <alessandro.portale@qt.io>
2017-07-11 20:28:14 +00:00
Orgad Shaneh
8430da3bf7 Merge remote-tracking branch 'origin/4.3' into master
Change-Id: I01ab8c85ea3372b6dce4142ddb9cf92d903ffca6
2017-05-23 23:41:40 +03:00
Eike Ziller
964dd4a3e1 Add a way to redirect the "install settings"
If the default install settings contain a value for
"Settings/InstallSettings", then that is used as the actual path for the
actual install settings instead.

If the path is relative, it is interpreted as relative to Qt Creator's
applicationDirPath.

Change-Id: I212037112e88c60c94239580841aa1400d96fb73
Reviewed-by: hjk <hjk@qt.io>
Reviewed-by: Kai Koehne <kai.koehne@qt.io>
2017-05-15 13:47:37 +00:00
Eike Ziller
64b19af7dd Merge remote-tracking branch 'origin/4.3'
Conflicts:
	qbs/modules/qtc/qtc.qbs
	qtcreator.pri

Change-Id: I6d89ea588de955f5d878500b59285d3adde6c77d
2017-05-15 15:31:55 +02:00
Alessandro Portale
36c8227caf App: (Re-)enable automatic HighDPI scaling for Linux
The original reason for disabling HighDPI scaling on Linux in
7da2b4a3cb was unhinted fonts for non-
scaled scenario: QTBUG-46435. That issue had been fixed long ago:
0f7bc885aa7ae8cc3c448cc751aba4eba8c1c8b8

HighDPI support on Linux should by now be good enough to give it another
try by default.

Change-Id: I5b74f46310254c2916a2f16a7655d9f096453cc3
Reviewed-by: J-P Nurmi <jpnurmi@qt.io>
Reviewed-by: Marco Benelli <marco.benelli@qt.io>
Reviewed-by: Eike Ziller <eike.ziller@qt.io>
2017-05-15 12:08:35 +00:00
Eike Ziller
ae2a9dbb78 Work around issue with vanishing menu bar with Unity
When Widget Designer is opened with a QMainWindow based form, the
"native" Unity menu bar vanishes. This is a workaround by disabling the
native menu bar integration on Linux.

Task-number: QTCREATORBUG-17519
Change-Id: I93eb3a590200fb8fff90017d8d6eddda8edaa42e
Reviewed-by: André Hartmann <aha_1980@gmx.de>
2017-05-12 07:12:30 +00:00