This patch adds the missing include statements for QRegExp.
Change-Id: Ibb03b929940adb84ae190b5090cb6b88653cc14c
Reviewed-by: Orgad Shaneh <orgads@gmail.com>
At startup, qtcreator prints an error:
% qtcreator
"The command \"/qmake\" could not be started."
This appears to be because of an off-by-one error in
BuildableHelperLibrary::qtChooserToQmakePath(const QString &path) which
parses the output of a call to "qtchooser -print-env" to extract the
value of the QTTOOLDIR variable. The code attempts to move past the
prefix string to find the end quote, but by moving one too few
characters it finds the starting quote instead, resulting in a zero
length string result.
Change-Id: I74368f10a81eda2286ae735bdc595c0f92e4e665
Reviewed-by: Tobias Hunger <tobias.hunger@qt.io>
Reviewed-by: Eike Ziller <eike.ziller@qt.io>
Only convert the raw output later in a stdOut() and stdErr() method of
the SynchronousProcessResponse.
This is necessary since we have processes that use different encodings
for different sections of the file (I am looking at you, git).
Also remove the signals for raw data on stdout/stderr, leaving only the
signals returning buffered QString lines. This should be safe, even
with UTF-16 output.
Change-Id: Ida613fa86d1468cbd33bc6b3a1506a849c2d1c0a
Reviewed-by: Tobias Hunger <tobias.hunger@qt.io>
Use SynchronousProcess::runBlocking in favor of SychronousProcess::run.
This avoid nested event loops which can produce really strange crashes
if not use carefully.
This patch only converts those processes that have a timeout of less
than 5 seconds or use the default timeout.
Change-Id: I9de8899dcc946af7049ea357a91972996c0256a1
Reviewed-by: Vikas Pachdha <vikas.pachdha@theqtcompany.com>
Reviewed-by: Tobias Hunger <tobias.hunger@qt.io>
waitForFinish returns false if the process is no longer running at
the time of the call. Handle that throughout the codebase.
Change-Id: Ia7194095454e82efbd4eb88f2d55926bdd09e094
Reviewed-by: hjk <hjk@theqtcompany.com>
We used to get a list of possible qmake file names, but now we
just get a list of filename patterns.
Task-number: QTCREATORBUG-13200
Change-Id: I9e635ec04b25139cfa8e7096173ac9e1910d0ef5
Reviewed-by: Daniel Teske <daniel.teske@digia.com>
Native file dialogs can only filter against the names of resolved
symlinks, not the name of the symlink (native Cocoa issue), which is
"qmake-4.8" in case of Qt 4 binary packages.
Simply avoid any stupid issues with not being able to select qmake
executables with whatever prefix by making the filter "qmake*".
Task-number: QTCREATORBUG-13190
Change-Id: Ieb059da75f3f1ecf2a2ff4a3e0633719e54ea43e
Reviewed-by: Daniel Teske <daniel.teske@digia.com>
Reviewed-by: Eike Ziller <eike.ziller@theqtcompany.com>
Less typing and less cycles than join(QString) where appropriate
Change-Id: I6ebc0e17e4d7fd9845864dd95b7de4ba4dad6906
Reviewed-by: Eike Ziller <eike.ziller@digia.com>
Resolve which qmake qtchooser will forward too, as that qmake will put
it's path into the makefile.
Task-number: QTCREATORBUG-9841
Change-Id: Ib7a17c7683550ce3bb9172c7428a0efc328652f5
Reviewed-by: Tobias Hunger <tobias.hunger@digia.com>
Task-number: QTCREATORBUG-9068
This makes 'qmake' the first qmake binary to check when iterating
over possible Qt:s on the system. Without this if the system uses the
old way of adding version suffixes to Qt binaries (kept for Qt 4 for
compatibility reasons in Debian and Ubuntu), Qt 4 would be used
over Qt 5 even if Qt 5 is the default.
I've tested it to be working on Ubuntu 13.04 and 12.04 LTS as follows,
with Qt Creator 2.7 patched. At each phase I removed the old Qt Creator
configuration to simulate first run.
1. With Qt 5 as the default, no qmake-qt4, Qt 5 continues to be found.
2. With Qt 5 as the default + qmake-qt4, Qt Creator now still finds Qt 5
as it's the /usr/bin/qmake - this is the part that fixes the bug.
3. With Qt 4 as the default, Qt 4 is found via /usr/bin/qmake
(before, it would have been found via qmake-qt4 symlink).
4. With qtchooser removed but qt4-qmake still installed, Qt 4 is
found via /usr/bin/qmake-qt4 as a fallback.
Change-Id: I05ed6dc0e81336330a0b3b458249e9c7c928cc40
Reviewed-by: Daniel Teske <daniel.teske@digia.com>
Forward-declare QGraphicsOpacityEffect in DetailsButton,
QProcessEnvironment in Environment, QFileInfo in fileutils,
QUrl in IWelcomePage, FancyLineEdit in PathChooser and
remove unneeded headers.
Change-Id: I7d5f273530dd2059bbdaf0899f0a3bc7e49e8482
Reviewed-by: hjk <hjk121@nokiamail.com>
#!/usr/bin/env ruby
Dir.glob('**/*.cpp') { |file|
# skip ast (excluding paste, astpath, and canv'ast'imer)
next if file =~ /ast[^eip]|keywords\.|qualifiers|preprocessor|names.cpp/i
s = File.read(file)
next if s.include?('qlalr')
orig = s.dup
s.gsub!(/\n *if [^\n]*{\n[^\n]*\n\s+}(\s+else if [^\n]* {\n[^\n]*\n\s+})*(\s+else {\n[^\n]*\n\s+})?\n/m) { |m|
res = $&
if res =~ /^\s*(\/\/|[A-Z_]{3,})/ # C++ comment or macro (Q_UNUSED, SDEBUG), do not touch braces
res
else
res.gsub!('} else', 'else')
res.gsub!(/\n +} *\n/m, "\n")
res.gsub(/ *{$/, '')
end
}
s.gsub!(/ *$/, '')
File.open(file, 'wb').write(s) if s != orig
}
Change-Id: I3b30ee60df0986f66c02132c65fc38a3fbb6bbdc
Reviewed-by: hjk <qthjk@ovi.com>
QMake is of version 3.0 in Qt5 and we failed to get the Qt version
from its output due to this.
Change-Id: I3208868d4cde652a3dd1e45f78d4f349b0acdd37
Reviewed-by: Daniel Teske <daniel.teske@digia.com>
The class' member functions are intended to be used
instead of the Q_OS_* macros in all contexts where
the latter are not syntactically required.
This lowers the likelihood of changes made on one
platform breaking the build on another, e.g. due to
the code model missing symbols in #ifdef'ed out code
when refactoring.
Change-Id: I4a54788591b4c8f8d589b8368a6c683d4155c9fa
Reviewed-by: hjk <qthjk@ovi.com>
Getting the #include directives ready for Qt5. This includes the
new-project wizards.
Change-Id: Ia9261f1e8faec06b9285b694d2b7e9a095978d2b
Reviewed-by: Eike Ziller <eike.ziller@nokia.com>
We didn't pass actually the targetMode and mkspec to qmake. E.g.
on Mac, debugging helpers therefore couldn't compile if the default
qmake mkspec is xcode.
Task-number: QTCREATORBUG-5806
Change-Id: I575012386983e1e285a500f99a34b7f21dcba29d
Reviewed-on: http://codereview.qt.nokia.com/2947
Reviewed-by: Qt Sanity Bot <qt_sanity_bot@ovi.com>
Reviewed-by: Eike Ziller <eike.ziller@nokia.com>
This prevents literally dozens of crash dialog boxes on Windows.
Check for a crash in the helper library and in updateVersionInfo
consistently whatever is called first.
Initialize qmakeIsExecutable in 2nd constructor as well.
Change-Id: Ifafb7b3edfae8826ac062d634a39a2a804446942
Reviewed-on: http://codereview.qt.nokia.com/1661
Reviewed-by: Qt Sanity Bot <qt_sanity_bot@ovi.com>
Reviewed-by: Daniel Teske <daniel.teske@nokia.com>