There are more, but we need to keep those because MSVC believes they are
required. This is the subset that satisifies both compilers.
Change-Id: I0b0a63d5496acc119a7f0513d3a1da0b76fa1fca
Reviewed-by: hjk <hjk@qt.io>
Reviewed-by: David Schulz <david.schulz@qt.io>
Reviewed-by: Eike Ziller <eike.ziller@qt.io>
The reasoning in 1b4766e26c did not take into account that the scope
of QT_NO_JAVA_STYLE_ITERATORS may change over time, as done with
f70905448f6 in Qt base.
Change-Id: Ib1966ff26c4d36d5f62e149d6b45baa4aecf825d
Reviewed-by: Eike Ziller <eike.ziller@qt.io>
As replacement for functionality that's being deprecated
in Qt but still useful or needed, or that cannot easily be handled
without resorting to #if QT_VERSION checks in user code.
Change-Id: Id3575a54ff944bf0e89d452d13944fcaee270208
Reviewed-by: Christian Kandeler <christian.kandeler@qt.io>
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>
When a modal dialog is open, we delay the opening of the reload prompt,
which is good.
We should not directly open the reload prompt while processing a focus
change signal, because that will interfere too much with the focus
itself. Queue the signal processing.
Fixes: QDS-381
Change-Id: I8973aa986de5a46bf874529cbbda0b325222fcac
Reviewed-by: Thomas Hartmann <thomas.hartmann@qt.io>
Tracks application state, and signals when it is changed.
Supports forcing blocked state with reference counting.
Change-Id: Ic173d42446b1b08bd4a1e7c1acf38c68644d30b3
Reviewed-by: Nikolai Kosjar <nikolai.kosjar@qt.io>
Reviewed-by: Eike Ziller <eike.ziller@qt.io>
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>
Git rebase is executed in the background, and it can change a file multiple
times in a short period. If we reparse a file while this happens on
Windows, Git fails to replace it, the rebase action fails and the
repository becomes unstable (remains with a modified file).
See discussion at https://github.com/git-for-windows/git/pull/1666
Task-number: QTCREATORBUG-15449
Change-Id: Iba40a770a1df2dfff0dd1c874c491dfbe1cceb58
Reviewed-by: Eike Ziller <eike.ziller@qt.io>
... by additionally keeping local (currently non-owning) pools per
"interesting" type.
Current situation:
- The global object pool does not scale well for looking up
objects, as iteration plus qobject_cast typically iterates
over all pooled objects.
- User code that can use typed results from the object
pool need to have access to the full type definition anyway,
i.e. depend on the plugin of the target class anyway.
The patch here solves the scaling problem is to have local
type-specific pools to which objects register in their
constructors and deregister in their destructors.
This patch here does *not* change the ownership model of the
pooled objects, however, it opens the possibility to change
the ownership model per type (e.g. by not putting things into
the global pool at all anymore and make the local pool 'owning')
and the intent is to handle that in later patchs.
Even without the follow-up patches this here is a performance
improvement for the cases that access the local pools instead
the global one, i.e. "practically all".
Change-Id: Ib11a42df2c4ecf5e1155534730083a520dd1995b
Reviewed-by: Eike Ziller <eike.ziller@qt.io>
Reviewed-by: Christian Kandeler <christian.kandeler@qt.io>
Hides the implementation detail that this is fetched from the object
pool from most places.
Change-Id: I0ea06c877fade50f62b62011bbc0d2f89fa8e885
Reviewed-by: Orgad Shaneh <orgads@gmail.com>
Reviewed-by: André Hartmann <aha_1980@gmx.de>
When using File > Open File or Project, and with Save As.
It was containing all mime types registered in Qt Creator, including the
default one from freedesktop.org, most of them being not interesting.
Task-number: QTCREATORBUG-17913
Change-Id: Ic5e49b27b566eb41419240b78a6cd99b233aeb07
Reviewed-by: Tobias Hunger <tobias.hunger@qt.io>
If a file is removed, the file system watcher can loose its watch
on it (e.g. on Linux, inode-based).
Saving files does so "safely" by writing a temporary file, moving
the original, and moving the new file in its place, which is
triggering the issue above. That is why we need to re-register
the path in the file system watcher.
This broke in the refactoring done
by 05485071b0
Task-number: QTCREATORBUG-18892
Change-Id: I3b216d614b9f82e308da63c07d990e5911193655
Reviewed-by: Tobias Hunger <tobias.hunger@qt.io>
If you use a case sensitive file system with a Qt Creator that is set to
case insensitive file system handling (default on Windows and macOS),
we still want file change notifications to work as long as you do not
actually have files that only differ in case.
This requires us to carefully differentiate between the keys that are
used for comparing files (=> case insensitive), and the paths that are
registered in the file watcher (=> file path as we get it from the
user).
Also for the check if a file path is a symlink, we should not check
equality of the resolved vs unresolved keys, but equality of the
cleaned, absolute paths (resolved vs unresolved).
Task-number: QTCREATORBUG-17929
Task-number: QTCREATORBUG-18672
Task-number: QTCREATORBUG-18678
Change-Id: I36b8b034880a0c60765a934b3c9e83316c4eb367
Reviewed-by: Christian Stenger <christian.stenger@qt.io>
Reviewed-by: Tobias Hunger <tobias.hunger@qt.io>
To avoid repeating the 'MimeDatabase mdb; mdb.something(); ' mantra
all over the place.
Change-Id: I4bfef62e73275a991455141671d6071162788e9d
Reviewed-by: Eike Ziller <eike.ziller@qt.io>
This doesn't fix the issue with cleaning the clear state of undo stack.
This introduced the issue when ui file is opened it's marked as modified.
It reverts 59c90e00c1
and d0c537ca75
Change-Id: Ifd4ff8483d6c297461632de500a4502b1fd0871f
Reviewed-by: Tobias Hunger <tobias.hunger@qt.io>
In case when the user has chosen not to reload the file.
Task-number: QTCREATORBUG-17048
Change-Id: I4eb78af2dbc655ab5e0f3fa19f506aa2302d7877
Reviewed-by: Tobias Hunger <tobias.hunger@qt.io>
Use fileDialogInitialDirectory() for all of them.
Conditionally initialize lastVisitedDirectory to projects directory to
preserve existing behavior on Open, when no project is open yet.
Change-Id: I318a7c7741e70a68758f0cc068ce956135103f3f
Reviewed-by: Eike Ziller <eike.ziller@qt.io>
Use ApplicationState and ApplicationStateChange event instead of
deprecated ApplicationActivate event and unreliable
QApplication::activeWindow(). That fixes an issue where the file change
dialog was not shown after closing a modal dialog on Linux, because
there the activeWindow is temporarily set to 0 for some reason.
Also avoid excessive timer. Modifying a file that is open in Qt Creator
should not result in the system waking up 5 times a second afterwards.
Task-number: QTCREATORBUG-15687
Change-Id: I105d08cd590cc3c8ee5d8efdc568ad5fd2be0857
Reviewed-by: Robert Loehning <robert.loehning@theqtcompany.com>
Reviewed-by: David Schulz <david.schulz@theqtcompany.com>