Mostly done using the following ruby script:
Dir.glob('**/*.cpp').each { |file|
next if file =~ %r{src/shared/qbs|/qmljs/}
s = File.read(file)
s.scan(/^using namespace (.*);$/) {
ns = $1
t = s.gsub(/^(.*)\b#{ns}::((?!Const)[A-Z])/) { |m|
before = $1
char = $2
if before =~ /"|\/\/|\\|using|SIGNAL|SLOT|Q_/
m
else
before + char
end
}
if t != s
puts file
File.open(file, 'w').write(t)
end
}
}
Change-Id: I5c6690f51488bf8ca3610ba9fb11e6e5fd814aaa
Reviewed-by: Christian Kandeler <christian.kandeler@theqtcompany.com>
Reviewed-by: hjk <hjk@theqtcompany.com>
Internal paths are supposed to be normalized
Change-Id: Ic6943ce13ad389dfdb44054a9e6f03da8c6cd88d
Reviewed-by: Eike Ziller <eike.ziller@theqtcompany.com>
This can for example happen when doing interactive git rebases.
* When a file was changed after we reloaded it, but before we removed
+readded the watcher, we wouldn't get a notification for these changes.
* When we got a file changed notification while we were in checkForReload
(because of event processing of the dialog, or file loading), the
notification was dropped and only processes when a check was triggered
again (e.g. at window activation, or when some (other) file changed)
Change-Id: Iab1861a8f05c739a3405bc1afe90ae6f2145057b
Task-number: QTCREATORBUG-9745
Reviewed-by: Daniel Teske <daniel.teske@theqtcompany.com>
Reviewed-by: Orgad Shaneh <orgads@gmail.com>
The project dir defaults to the home directory.
Task-number: QTCREATORBUG-13366
Change-Id: I5a34ae458cacde9e12df50e0796ca7d236bb123e
Reviewed-by: Friedemann Kleint <Friedemann.Kleint@theqtcompany.com>
Move exported class out of namespace Internal, but expose only a minimal
interface. Use Qt 5 connections, adjust callers and surrounding code.
Change-Id: I52b4156d78cd1ec42ec6c94994775ce74f24ebdc
Reviewed-by: hjk <hjk121@nokiamail.com>
This eliminates a bunch of list->set->list conversions. Especially the
ProjectInfo::appendProjectPart takes lots of time converting for every
part added.
Change-Id: Ib3c8cd4b0ad6c012ccbeed12ebedd46b9b6cca95
Reviewed-by: Daniel Teske <daniel.teske@digia.com>
Less typing and less cycles than join(QString) where appropriate
Change-Id: I6ebc0e17e4d7fd9845864dd95b7de4ba4dad6906
Reviewed-by: Eike Ziller <eike.ziller@digia.com>
It was closing all existing editors and opening a single new one in the
"current" split.
Instead, open new editors in all splits where the file was open and
visible.
Change-Id: Iac7238077b2e42937ce54eea65fa1b61dcd07df1
Reviewed-by: David Schulz <david.schulz@digia.com>
Currently we pass in some places by value, elsewhere by const ref and
for some weird reason also by const value in a lot of places. The latter
is particularly annoying, as it is also used in interfaces and therefore
forces all implementors to do the same, since leaving the "const" off is
causing compiler warnings with MSVC.
Change-Id: I65b87dc3cce0986b8a55ff6119cb752361027803
Reviewed-by: hjk <hjk121@nokiamail.com>
We have fileNameCaseSensitivity and withExecutableSuffix et al.
Change-Id: I79bd2cd57e258c3f15673a661a49bab597d7afa4
Reviewed-by: Daniel Teske <daniel.teske@digia.com>
This broke when introducing delayed setting of the currentEditor when
the context changes. Simply move the logic from the document manager to
the editor manager, where it arguably belongs to anyway, and also set
the currentFile delayed in that case.
Task-number: QTCREATORBUG-12264
Change-Id: I67ee3f9a02e62cfa67671629c956a4290361cba8
Reviewed-by: Daniel Teske <daniel.teske@digia.com>
Reviewed-by: David Schulz <david.schulz@digia.com>
Move item model implementation to private, adjust user code.
Change-Id: Ifbe94e7c7b9b1e8be1b4c531958dbd7a9413af13
Reviewed-by: Eike Ziller <eike.ziller@digia.com>
Introduce methods to save a document/list of documents/all documents,
both silently and with a dialog to the DocumentManager.
All of these return a bool that signifies whether the save was
successful or not.
Detailed information on which files failed to load or whether the
save was canceled by the user are still available as optional
in/out parameters.
Change-Id: Id17798302f2a8ba6b85a07c1f0b91f03b20da03f
Reviewed-by: Tobias Hunger <tobias.hunger@digia.com>
Only methods as programming functions are affected. Besides renaming
some actions like "Switch Between Function Declaration/Definition" this
mostly touches (api) code comments.
This is a follow-up patch to commit 872bfb7.
Change-Id: Icb65e8d73b59a022f8885b14df497169543a3b92
Reviewed-by: hjk <hjk121@nokiamail.com>
Remove \brief commands for functions.
Use standard wording for QDoc commands.
Fix style and grammar issues.
Use the \a command instead of the \c command for attributes
in function descriptions.
Do not use \returns, because it does not exist.
Change-Id: Icd32b519670cb376e246bab3a58fe7e98d2529ea
Reviewed-by: Eike Ziller <eike.ziller@digia.com>
Also adjust and streamline using and surrounding code.
Change-Id: I6a8b05126bdcbb74ff611b21c7cb3c5902a2d5ca
Reviewed-by: Tobias Hunger <tobias.hunger@digia.com>
Reviewed-by: Orgad Shaneh <orgads@gmail.com>
A lot of our build system files specify unneeded include
paths. These roughly fall into the following categories:
a) Paths that are already set in more general files
such as qtcreator.pri.
b) Paths that serve no purpose at all, possibly
left over from earlier versions of the project.
c) Paths that act as workarounds for wrong include
statements of the form '#include "xyz.h"', where
xyz.h is not in the same directory as the including
file.
This patch removes such path specifications and fixes the offending
include statements from case c).
Tested on Linux, Windows and OSX with qmake and qbs.
Change-Id: I039a8449f8a65df0d616b4c08081145c18ae4b15
Reviewed-by: Oswald Buddenhagen <oswald.buddenhagen@digia.com>
Reviewed-by: Joerg Bornemann <joerg.bornemann@digia.com>
And move to using the corresponding method in document model.
Change-Id: I80b12ceab8a91c5393b9c0422d660a8896ae09d8
Reviewed-by: Tobias Hunger <tobias.hunger@digia.com>
It's a property of the document implementation, not of the specific
editor instance working on it.
Change-Id: I5c3dd054e21b646e2d94b891916a096d045923f8
Reviewed-by: hjk <hjk121@nokiamail.com>
Reviewed-by: Eike Ziller <eike.ziller@digia.com>
That is what it actually is, wrt how Qt API calls it.
Change-Id: Ied02055debf6aad75556b0d9d22e8ba2f72be555
Reviewed-by: Eike Ziller <eike.ziller@digia.com>
Instead of requiring subclasses to implement a method.
Also renames IDocument::rename to IDocument::setFileName,
since it doesn't really rename any files or such.
Change-Id: I1344025c24d2f74a6a983e04fb0a5245f1f37aad
Reviewed-by: Daniel Teske <daniel.teske@digia.com>
Reviewed-by: Eike Ziller <eike.ziller@digia.com>
The notification was only done when the main window was activated which
leads to funny results with external editor windows.
Change-Id: I657ef7e429256f9c098b1fc744d40ffbc2bb5260
Reviewed-by: Daniel Teske <daniel.teske@digia.com>
QDoc does some magic with the \class and \namespaces
and \brief commands, so the following wording must be used:
"The xxx class yyy ..."
Change-Id: Id231f30e8464898b776888d5423523de404aae34
Reviewed-by: Eike Ziller <eike.ziller@digia.com>