forked from qt-creator/qt-creator
Merge remote-tracking branch 'origin/3.0'
This commit is contained in:
203
dist/changes-3.0.0
vendored
Normal file
203
dist/changes-3.0.0
vendored
Normal file
@@ -0,0 +1,203 @@
|
|||||||
|
Qt Creator version 3.0 contains bug fixes and new features.
|
||||||
|
|
||||||
|
There is a total of about 1250 changes by 60 individual contributors.
|
||||||
|
|
||||||
|
The most important changes are listed in this document. For a complete
|
||||||
|
list of changes, see the Git log for the Qt Creator sources that
|
||||||
|
you can check out from the public Git repository. For example:
|
||||||
|
|
||||||
|
git clone git://gitorious.org/qt-creator/qt-creator.git
|
||||||
|
git log --cherry-pick --pretty=oneline v2.8.1..origin/3.0
|
||||||
|
|
||||||
|
General
|
||||||
|
* Added -pluginpath command line argument for adding plugin search paths
|
||||||
|
* Fixed "All templates" entry in "New" dialog (QTCREATORBUG-9792)
|
||||||
|
|
||||||
|
Editing
|
||||||
|
* Added option to close all files when deleted files for open editors
|
||||||
|
are detected
|
||||||
|
* Fixed issues with splitting when editor is not splittable (QTCREATORBUG-6827)
|
||||||
|
* Added action for closing all editors except the visible ones (QTCREATORBUG-9893)
|
||||||
|
|
||||||
|
Managing and Building Projects
|
||||||
|
* Fixed exit code that is shown for applications that are run in terminal
|
||||||
|
(QTCREATORBUG-9740)
|
||||||
|
* Added support for ANSI colors in compile and application output
|
||||||
|
(QTCREATORBUG-5956, QTCREATORBUG-9592)
|
||||||
|
* Added support for renaming auto-detected kits, Qt versions, compilers and debuggers
|
||||||
|
(QTCREATORBUG-9787)
|
||||||
|
|
||||||
|
Compilers
|
||||||
|
|
||||||
|
Devices
|
||||||
|
|
||||||
|
QMake Projects
|
||||||
|
* Fixed issues when using qtchooser (QTCREATORBUG-9841)
|
||||||
|
* Fixed issues with autosave files triggering reparses (QTCREATORBUG-9957)
|
||||||
|
* Fixed that run configurations were created for targets that are not built (QTCREATORBUG-9549)
|
||||||
|
|
||||||
|
CMake Projects
|
||||||
|
* Added parser for CMake build errors
|
||||||
|
* Fixed that build targets were not updated when CMakeLists.txt changes
|
||||||
|
* Added support for a CMakeDeployment.txt file that defines deployment rules
|
||||||
|
|
||||||
|
Qbs Projects
|
||||||
|
|
||||||
|
Generic Projects
|
||||||
|
|
||||||
|
Debugging
|
||||||
|
* GDB
|
||||||
|
* Fixed various pretty printers
|
||||||
|
* CDB
|
||||||
|
* Fixed interrupting 32 bit processes from 64 bit Qt Creator builds
|
||||||
|
* LLDB
|
||||||
|
* Fixed various pretty printers
|
||||||
|
* QML
|
||||||
|
|
||||||
|
Analyzer
|
||||||
|
|
||||||
|
C++ Support
|
||||||
|
* Fixed finding usages of template classes and functions
|
||||||
|
* Fixed support for namespace aliases inside blocks and functions (QTCREATORBUG-166)
|
||||||
|
* Fixed support for class and enum definitions inside blocks and functions
|
||||||
|
(QTCREATORBUG-3620, QTCREATORBUG-6013, QTCREATORBUG-8020)
|
||||||
|
* Added code completion support for lambda calls (QTCREATORBUG-9523)
|
||||||
|
* Added graceful handling of Objective-C's @try, @catch and @throw statements
|
||||||
|
(QTCREATORBUG-9309)
|
||||||
|
* Fixed completion for templates with template parameters inside namespace
|
||||||
|
(QTCREATORBUG-8852)
|
||||||
|
* Fixed handling of wide and UTF-n string literals
|
||||||
|
* Added option to explicitly choose a project for a file, and add preprocessor directives
|
||||||
|
specific to it (QTCREATORBUG-9802, QTCREATORBUG-1249)
|
||||||
|
* Fixed crash when resolving typedefs with templates (QTCREATORBUG-10320)
|
||||||
|
* Fixed crash when completing switch/case statement (QTCREATORBUG-10366)
|
||||||
|
* Fixed issues with showing type hierarchy (QTCREATORBUG-9819)
|
||||||
|
* Added "Optimize For Loop" refactoring action
|
||||||
|
* Added "Extract Constant as Function Parameter" refactoring action
|
||||||
|
* Added include hierarchy view in navigation side bar
|
||||||
|
* Added list of potential destinations when doing "Follow Symbol" on
|
||||||
|
virtual function calls (QTCREATORBUG-9611)
|
||||||
|
* Fixed "Follow Symbol" for operators (QTCREATORBUG-7485)
|
||||||
|
|
||||||
|
Python Support
|
||||||
|
|
||||||
|
GLSL Support
|
||||||
|
* Fixed crash (QTCREATORBUG-10166)
|
||||||
|
|
||||||
|
Diff Viewer
|
||||||
|
* Added button that switches between inline and side-by-side view
|
||||||
|
* Added syntax highlighting (QTCREATORBUG-9580)
|
||||||
|
|
||||||
|
Version Control Systems
|
||||||
|
* Fixed crash when reverting changes while commit editor is open (QTCREATORBUG-10190)
|
||||||
|
* Added VCS topic to window title
|
||||||
|
* Git
|
||||||
|
* Added information about files with conflict when doing "git stash pop"
|
||||||
|
* Added action for opening "git gui"
|
||||||
|
* Added support for removing and renaming tags
|
||||||
|
* Added support for setting remote tracking branch (QTCREATORBUG-8863)
|
||||||
|
* Added disambiguation of branch names (QTCREATORBUG-9700)
|
||||||
|
* Fixed updating of log view from branches dialog (QTCREATORBUG-9783)
|
||||||
|
* ClearCase
|
||||||
|
|
||||||
|
FakeVim
|
||||||
|
|
||||||
|
Platform Specific
|
||||||
|
|
||||||
|
Linux
|
||||||
|
|
||||||
|
Qt Support
|
||||||
|
|
||||||
|
QNX
|
||||||
|
* Added check for existence of debug token and show error message in that case (QTCREATORBUG-9103)
|
||||||
|
|
||||||
|
Android
|
||||||
|
* Added error messages for incompatible devices to compile output (QTCREATORBUG-9690)
|
||||||
|
* Fixed browse button for OpenJDK location (QTCREATORBUG-9706)
|
||||||
|
* Fixed generated kit display name (QTCREATORBUG-9865)
|
||||||
|
* Fixed issues with Android virtual devices support
|
||||||
|
* Added support for minimum and target SDK settings
|
||||||
|
* Added target selector to manifest editor (QTCREATORBUG-9682)
|
||||||
|
* Improved the keystore and certificate dialog (QTCREATORBUG-10061)
|
||||||
|
* Made signing option independent of debug vs release builds (QTCREATORBUG-10060)
|
||||||
|
* Fixed signing with OpenJDK 7
|
||||||
|
* Added support for Qt 5.2 deployment mechanism
|
||||||
|
* Added editor for third-party libraries to deployment settings (QTCREATORBUG-9849)
|
||||||
|
|
||||||
|
Remote Linux
|
||||||
|
* Fixed ssh authentication for servers that don't allow non-interactive
|
||||||
|
password authentication (QTCREATORBUG-9568)
|
||||||
|
|
||||||
|
Bare Metal
|
||||||
|
* Added experimental support for devices with only a gdbserver/openocd
|
||||||
|
|
||||||
|
Credits for these changes go to:
|
||||||
|
|
||||||
|
Alexey Semenko
|
||||||
|
André Hartmann
|
||||||
|
André Pönitz
|
||||||
|
Andrew Knight
|
||||||
|
Aurindam Jana
|
||||||
|
BogDan Vatra
|
||||||
|
Carl Simonson
|
||||||
|
Christiaan Janssen
|
||||||
|
Christian Kamm
|
||||||
|
Christian Kandeler
|
||||||
|
Christian Stenger
|
||||||
|
Christian Strømme
|
||||||
|
Daniel Teske
|
||||||
|
David Kaspar
|
||||||
|
David McFarland
|
||||||
|
David Schulz
|
||||||
|
Eike Ziller
|
||||||
|
El Mehdi Fekari
|
||||||
|
Erik Verbruggen
|
||||||
|
Eskil Abrahamsen Blomfeldt
|
||||||
|
Fawzi Mohamed
|
||||||
|
Francois Ferrand
|
||||||
|
Frank Osterfeld
|
||||||
|
Frantisek Vacek
|
||||||
|
Friedemann Kleint
|
||||||
|
Guido Seifert
|
||||||
|
Guillaume Belz
|
||||||
|
Gunnar Sletta
|
||||||
|
hluk
|
||||||
|
Jake Petroules
|
||||||
|
Jaroslaw Kobus
|
||||||
|
Jens Bache-Wiig
|
||||||
|
Jerome Pasion
|
||||||
|
Jörg Bornemann
|
||||||
|
Kai Köhne
|
||||||
|
Leena Miettinen
|
||||||
|
Lincoln Ramsay
|
||||||
|
Lorenz Haas
|
||||||
|
Marco Bubke
|
||||||
|
Martin Bohacek
|
||||||
|
Michal Klocek
|
||||||
|
Nicolas Arnaud-Cormos
|
||||||
|
Nikita Baryshnikov
|
||||||
|
Nikolai Kosjar
|
||||||
|
Oleksii Serdiuk
|
||||||
|
Orgad Shaneh
|
||||||
|
Oswald Buddenhagen
|
||||||
|
Paul Olav Tvete
|
||||||
|
Petar Perisin
|
||||||
|
Przemyslaw Gorszkowski
|
||||||
|
Radovan Zivkovic
|
||||||
|
Rafael Roquetto
|
||||||
|
Rainer Keller
|
||||||
|
Robert Löhning
|
||||||
|
Sergio Ahumada
|
||||||
|
Simon Hausmann
|
||||||
|
Takumi Asaki
|
||||||
|
Thiago Macieira
|
||||||
|
Thomas Hartmann
|
||||||
|
Thomas Zander
|
||||||
|
Tim Jenssen
|
||||||
|
Tim Sander
|
||||||
|
Tobias Hunger
|
||||||
|
Tobias Nätterlund
|
||||||
|
Viktor Ostashevskyi (Віктор Осташевський)
|
||||||
|
vlaomao
|
||||||
|
Volker Vogelhuber
|
||||||
|
Yuchen Deng
|
||||||
@@ -127,7 +127,7 @@
|
|||||||
\li Select \gui Details to view the
|
\li Select \gui Details to view the
|
||||||
\gui {Package configurations}. For more information about the
|
\gui {Package configurations}. For more information about the
|
||||||
options you have, see
|
options you have, see
|
||||||
\l{Specifying Settings for Application Packages}.
|
\l{Specifying Settings for Qt 4 Packages}.
|
||||||
|
|
||||||
\li To specify settings for deploying applications to Android, select
|
\li To specify settings for deploying applications to Android, select
|
||||||
\gui Details to view the \gui {Deploy configurations}. For more
|
\gui Details to view the \gui {Deploy configurations}. For more
|
||||||
|
|||||||
@@ -41,18 +41,8 @@
|
|||||||
\l{Creating Qt Quick Projects}{type of the project}: Qt Quick UI or Qt Quick
|
\l{Creating Qt Quick Projects}{type of the project}: Qt Quick UI or Qt Quick
|
||||||
Application, and the Qt version used.
|
Application, and the Qt version used.
|
||||||
|
|
||||||
To debug Qt Quick UI projects:
|
To debug Qt Quick UI projects, select the \gui {Enable QML} check box in the
|
||||||
|
\gui {Debugger Settings} in \gui Projects mode \gui {Run Settings}.
|
||||||
\list 1
|
|
||||||
|
|
||||||
\li In \gui Projects mode \gui {Run Settings}, select the
|
|
||||||
\gui {Enable QML} check box in the \gui {Debugger Settings} to
|
|
||||||
enable QML debugging.
|
|
||||||
|
|
||||||
\li For Qt 4.7, compile the QML Inspector debugging helper. For more information,
|
|
||||||
see \l{Debugging Helpers for QML}.
|
|
||||||
|
|
||||||
\endlist
|
|
||||||
|
|
||||||
To debug Qt Quick Applications:
|
To debug Qt Quick Applications:
|
||||||
|
|
||||||
|
|||||||
@@ -74,7 +74,7 @@
|
|||||||
\QC uses its own set of Qt Libraries located in the bundle, and therefore,
|
\QC uses its own set of Qt Libraries located in the bundle, and therefore,
|
||||||
you need to configure the \QD plugins that you want to use with \QC.
|
you need to configure the \QD plugins that you want to use with \QC.
|
||||||
Fore more information about how to deploy applications to Mac OS, see
|
Fore more information about how to deploy applications to Mac OS, see
|
||||||
\l{Deploying an Application on Mac OS X}.
|
\l{Qt for Mac OS X - Deployment}.
|
||||||
|
|
||||||
The following example illustrates how to configure version 5.2.1 of the
|
The following example illustrates how to configure version 5.2.1 of the
|
||||||
\l{http://qwt.sourceforge.net/}{Qwt - Qt Widgets for Technical Applications}
|
\l{http://qwt.sourceforge.net/}{Qwt - Qt Widgets for Technical Applications}
|
||||||
|
|||||||
@@ -960,7 +960,7 @@ class Dumper(DumperBase):
|
|||||||
if vtable & 0x3: # This is not a pointer.
|
if vtable & 0x3: # This is not a pointer.
|
||||||
return False
|
return False
|
||||||
metaObjectEntry = self.dereference(vtable) # It's the first entry.
|
metaObjectEntry = self.dereference(vtable) # It's the first entry.
|
||||||
if metaObjectEntry & 0x3: # This is not a pointer.
|
if metaObjectEntry & 0x1: # This is not a pointer.
|
||||||
return False
|
return False
|
||||||
#warn("MO: 0x%x " % metaObjectEntry)
|
#warn("MO: 0x%x " % metaObjectEntry)
|
||||||
s = gdb.execute("info symbol 0x%x" % metaObjectEntry, to_string=True)
|
s = gdb.execute("info symbol 0x%x" % metaObjectEntry, to_string=True)
|
||||||
@@ -1272,7 +1272,7 @@ class Dumper(DumperBase):
|
|||||||
# generic pointer." with MinGW's gcc 4.5 when it "identifies"
|
# generic pointer." with MinGW's gcc 4.5 when it "identifies"
|
||||||
# a "QWidget &" as "void &" and with optimized out code.
|
# a "QWidget &" as "void &" and with optimized out code.
|
||||||
self.putItem(value.cast(type.target().unqualified()))
|
self.putItem(value.cast(type.target().unqualified()))
|
||||||
self.putBetterType(typeName)
|
self.putBetterType("%s &" % self.currentType)
|
||||||
return
|
return
|
||||||
except RuntimeError:
|
except RuntimeError:
|
||||||
self.putValue("<optimized out reference>")
|
self.putValue("<optimized out reference>")
|
||||||
|
|||||||
@@ -428,7 +428,7 @@ def qdump__std__stringHelper1(d, value, charSize):
|
|||||||
sizePtr = data.cast(d.sizetType().pointer())
|
sizePtr = data.cast(d.sizetType().pointer())
|
||||||
size = int(sizePtr[-3])
|
size = int(sizePtr[-3])
|
||||||
alloc = int(sizePtr[-2])
|
alloc = int(sizePtr[-2])
|
||||||
refcount = int(sizePtr[-1])
|
refcount = int(sizePtr[-1]) & 0xffffffff
|
||||||
d.check(refcount >= -1) # Can be -1 accoring to docs.
|
d.check(refcount >= -1) # Can be -1 accoring to docs.
|
||||||
d.check(0 <= size and size <= alloc and alloc <= 100*1000*1000)
|
d.check(0 <= size and size <= alloc and alloc <= 100*1000*1000)
|
||||||
qdump_stringHelper(d, sizePtr, size * charSize, charSize)
|
qdump_stringHelper(d, sizePtr, size * charSize, charSize)
|
||||||
@@ -687,7 +687,7 @@ def qdump__std__vector(d, value):
|
|||||||
start = impl["_M_start"]["_M_p"]
|
start = impl["_M_start"]["_M_p"]
|
||||||
finish = impl["_M_finish"]["_M_p"]
|
finish = impl["_M_finish"]["_M_p"]
|
||||||
# FIXME: 8 is CHAR_BIT
|
# FIXME: 8 is CHAR_BIT
|
||||||
size = (int(finish) - int(start)) * 8
|
size = (d.pointerValue(finish) - d.pointerValue(start)) * 8
|
||||||
size += int(impl["_M_finish"]["_M_offset"])
|
size += int(impl["_M_finish"]["_M_offset"])
|
||||||
size -= int(impl["_M_start"]["_M_offset"])
|
size -= int(impl["_M_start"]["_M_offset"])
|
||||||
else:
|
else:
|
||||||
@@ -706,10 +706,11 @@ def qdump__std__vector(d, value):
|
|||||||
if d.isExpanded():
|
if d.isExpanded():
|
||||||
if isBool:
|
if isBool:
|
||||||
with Children(d, size, maxNumChild=10000, childType=type):
|
with Children(d, size, maxNumChild=10000, childType=type):
|
||||||
|
base = d.pointerValue(start)
|
||||||
for i in d.childRange():
|
for i in d.childRange():
|
||||||
q = start + int(i / storagesize)
|
q = base + int(i / 8)
|
||||||
d.putBoolItem(str(i),
|
d.putBoolItem(str(i),
|
||||||
(int(q.dereference()) >> (i % storagesize)) & 1)
|
(int(d.dereference(q)) >> (i % 8)) & 1)
|
||||||
else:
|
else:
|
||||||
d.putArrayData(type, start, size)
|
d.putArrayData(type, start, size)
|
||||||
|
|
||||||
|
|||||||
@@ -9,15 +9,29 @@
|
|||||||
"supportedImports": [
|
"supportedImports": [
|
||||||
"Qt.labs.folderlistmodel 2.0",
|
"Qt.labs.folderlistmodel 2.0",
|
||||||
"QtAudioEngine 1.0",
|
"QtAudioEngine 1.0",
|
||||||
|
"QtBluetooth 5.0",
|
||||||
|
"QtBluetooth 5.2",
|
||||||
|
"QtGraphicalEffects 1.0",
|
||||||
"QtMultimedia 5.0",
|
"QtMultimedia 5.0",
|
||||||
|
"QtNfc 5.0",
|
||||||
|
"QtNfc 5.2",
|
||||||
|
"QtPositioning 5.0",
|
||||||
|
"QtPositioning 5.2",
|
||||||
"QtQuick.Controls 1.0",
|
"QtQuick.Controls 1.0",
|
||||||
|
"QtQuick.Controls 1.1",
|
||||||
|
"QtQuick.Controls.Styles 1.0",
|
||||||
|
"QtQuick.Controls.Styles 1.1",
|
||||||
"QtQuick.Dialogs 1.0",
|
"QtQuick.Dialogs 1.0",
|
||||||
|
"QtQuick.Dialogs 1.1",
|
||||||
"QtQuick.Layouts 1.0",
|
"QtQuick.Layouts 1.0",
|
||||||
|
"QtQuick.Layouts 1.1",
|
||||||
"QtQuick.LocalStorage 2.0",
|
"QtQuick.LocalStorage 2.0",
|
||||||
"QtQuick.Particles 2.0",
|
"QtQuick.Particles 2.0",
|
||||||
"QtQuick.Window 2.0",
|
"QtQuick.Window 2.0",
|
||||||
"QtQuick.XmlListModel 2.0",
|
"QtQuick.XmlListModel 2.0",
|
||||||
"QtQuick 2.0",
|
"QtQuick 2.0",
|
||||||
|
"QtQuick 2.1",
|
||||||
|
"QtQuick 2.2",
|
||||||
"QtTest 1.0",
|
"QtTest 1.0",
|
||||||
"QtWebKit 3.0"]
|
"QtWebKit 3.0"]
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -298,6 +298,7 @@ int main(int argc, char **argv)
|
|||||||
#if defined(Q_OS_UNIX) && !defined(Q_OS_MAC)
|
#if defined(Q_OS_UNIX) && !defined(Q_OS_MAC)
|
||||||
// QML is unusable with the xlib backend
|
// QML is unusable with the xlib backend
|
||||||
QApplication::setGraphicsSystem(QLatin1String("raster"));
|
QApplication::setGraphicsSystem(QLatin1String("raster"));
|
||||||
|
qputenv("QSG_RENDER_LOOP", "basic"); // workaround for QTBUG-35143
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
SharedTools::QtSingleApplication app((QLatin1String(appNameC)), argc, argv);
|
SharedTools::QtSingleApplication app((QLatin1String(appNameC)), argc, argv);
|
||||||
|
|||||||
@@ -906,49 +906,7 @@ bool Preprocessor::handleIdentifier(PPToken *tk)
|
|||||||
{
|
{
|
||||||
ScopedBoolSwap s(m_state.m_inPreprocessorDirective, true);
|
ScopedBoolSwap s(m_state.m_inPreprocessorDirective, true);
|
||||||
|
|
||||||
static const QByteArray ppLine("__LINE__");
|
Macro *macro = m_env->resolve(tk->asByteArrayRef());
|
||||||
static const QByteArray ppFile("__FILE__");
|
|
||||||
static const QByteArray ppDate("__DATE__");
|
|
||||||
static const QByteArray ppTime("__TIME__");
|
|
||||||
|
|
||||||
ByteArrayRef macroNameRef = tk->asByteArrayRef();
|
|
||||||
|
|
||||||
if (macroNameRef.size() == 8
|
|
||||||
&& macroNameRef[0] == '_'
|
|
||||||
&& macroNameRef[1] == '_') {
|
|
||||||
PPToken newTk;
|
|
||||||
if (macroNameRef == ppLine) {
|
|
||||||
QByteArray txt = QByteArray::number(tk->lineno);
|
|
||||||
newTk = generateToken(T_STRING_LITERAL, txt.constData(), txt.size(), tk->lineno, false);
|
|
||||||
} else if (macroNameRef == ppFile) {
|
|
||||||
QByteArray txt;
|
|
||||||
txt.append('"');
|
|
||||||
txt.append(m_env->currentFileUtf8);
|
|
||||||
txt.append('"');
|
|
||||||
newTk = generateToken(T_STRING_LITERAL, txt.constData(), txt.size(), tk->lineno, false);
|
|
||||||
} else if (macroNameRef == ppDate) {
|
|
||||||
QByteArray txt;
|
|
||||||
txt.append('"');
|
|
||||||
txt.append(QDate::currentDate().toString().toUtf8());
|
|
||||||
txt.append('"');
|
|
||||||
newTk = generateToken(T_STRING_LITERAL, txt.constData(), txt.size(), tk->lineno, false);
|
|
||||||
} else if (macroNameRef == ppTime) {
|
|
||||||
QByteArray txt;
|
|
||||||
txt.append('"');
|
|
||||||
txt.append(QTime::currentTime().toString().toUtf8());
|
|
||||||
txt.append('"');
|
|
||||||
newTk = generateToken(T_STRING_LITERAL, txt.constData(), txt.size(), tk->lineno, false);
|
|
||||||
}
|
|
||||||
|
|
||||||
if (newTk.hasSource()) {
|
|
||||||
newTk.f.newline = tk->newline();
|
|
||||||
newTk.f.whitespace = tk->whitespace();
|
|
||||||
*tk = newTk;
|
|
||||||
return false;
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
Macro *macro = m_env->resolve(macroNameRef);
|
|
||||||
if (!macro
|
if (!macro
|
||||||
|| (tk->expanded()
|
|| (tk->expanded()
|
||||||
&& m_state.m_tokenBuffer
|
&& m_state.m_tokenBuffer
|
||||||
|
|||||||
@@ -37,6 +37,10 @@
|
|||||||
#include <QPainter>
|
#include <QPainter>
|
||||||
#include <QStyleOption>
|
#include <QStyleOption>
|
||||||
|
|
||||||
|
#if QT_VERSION >= 0x050100
|
||||||
|
#include <QGuiApplication>
|
||||||
|
#endif
|
||||||
|
|
||||||
using namespace Utils;
|
using namespace Utils;
|
||||||
|
|
||||||
FadingWidget::FadingWidget(QWidget *parent) :
|
FadingWidget::FadingWidget(QWidget *parent) :
|
||||||
@@ -123,12 +127,19 @@ void DetailsButton::paintEvent(QPaintEvent *e)
|
|||||||
if (!HostOsInfo::isMacHost() && !isDown() && m_fader > 0)
|
if (!HostOsInfo::isMacHost() && !isDown() && m_fader > 0)
|
||||||
p.fillRect(rect().adjusted(1, 1, -2, -2), QColor(255, 255, 255, int(m_fader*180)));
|
p.fillRect(rect().adjusted(1, 1, -2, -2), QColor(255, 255, 255, int(m_fader*180)));
|
||||||
|
|
||||||
|
qreal checkedPixmapRatio = 1.0;
|
||||||
|
qreal uncheckedPixmapRatio = 1.0;
|
||||||
|
#if QT_VERSION >= 0x050100
|
||||||
|
checkedPixmapRatio = m_checkedPixmap.devicePixelRatio();
|
||||||
|
uncheckedPixmapRatio = m_uncheckedPixmap.devicePixelRatio();
|
||||||
|
#endif
|
||||||
|
|
||||||
if (isChecked()) {
|
if (isChecked()) {
|
||||||
if (m_checkedPixmap.isNull() || m_checkedPixmap.size() != contentsRect().size())
|
if (m_checkedPixmap.isNull() || m_checkedPixmap.size() / checkedPixmapRatio != contentsRect().size())
|
||||||
m_checkedPixmap = cacheRendering(contentsRect().size(), true);
|
m_checkedPixmap = cacheRendering(contentsRect().size(), true);
|
||||||
p.drawPixmap(contentsRect(), m_checkedPixmap);
|
p.drawPixmap(contentsRect(), m_checkedPixmap);
|
||||||
} else {
|
} else {
|
||||||
if (m_uncheckedPixmap.isNull() || m_uncheckedPixmap.size() != contentsRect().size())
|
if (m_uncheckedPixmap.isNull() || m_uncheckedPixmap.size() / uncheckedPixmapRatio != contentsRect().size())
|
||||||
m_uncheckedPixmap = cacheRendering(contentsRect().size(), false);
|
m_uncheckedPixmap = cacheRendering(contentsRect().size(), false);
|
||||||
p.drawPixmap(contentsRect(), m_uncheckedPixmap);
|
p.drawPixmap(contentsRect(), m_uncheckedPixmap);
|
||||||
}
|
}
|
||||||
@@ -145,7 +156,14 @@ QPixmap DetailsButton::cacheRendering(const QSize &size, bool checked)
|
|||||||
lg.setCoordinateMode(QGradient::ObjectBoundingMode);
|
lg.setCoordinateMode(QGradient::ObjectBoundingMode);
|
||||||
lg.setFinalStop(0, 1);
|
lg.setFinalStop(0, 1);
|
||||||
|
|
||||||
QPixmap pixmap(size);
|
qreal pixelRatio = 1.0;
|
||||||
|
#if QT_VERSION >= 0x050100
|
||||||
|
pixelRatio = devicePixelRatio();
|
||||||
|
#endif
|
||||||
|
QPixmap pixmap(size * pixelRatio);
|
||||||
|
#if QT_VERSION >= 0x050100
|
||||||
|
pixmap.setDevicePixelRatio(pixelRatio);
|
||||||
|
#endif
|
||||||
pixmap.fill(Qt::transparent);
|
pixmap.fill(Qt::transparent);
|
||||||
QPainter p(&pixmap);
|
QPainter p(&pixmap);
|
||||||
p.setRenderHint(QPainter::Antialiasing, true);
|
p.setRenderHint(QPainter::Antialiasing, true);
|
||||||
|
|||||||
@@ -312,6 +312,8 @@ QString MakeStepConfigWidget::summaryText() const
|
|||||||
void MakeStepConfigWidget::updateDetails()
|
void MakeStepConfigWidget::updateDetails()
|
||||||
{
|
{
|
||||||
BuildConfiguration *bc = m_makeStep->buildConfiguration();
|
BuildConfiguration *bc = m_makeStep->buildConfiguration();
|
||||||
|
if (!bc)
|
||||||
|
bc = m_makeStep->target()->activeBuildConfiguration();
|
||||||
ToolChain *tc = ProjectExplorer::ToolChainKitInformation::toolChain(m_makeStep->target()->kit());
|
ToolChain *tc = ProjectExplorer::ToolChainKitInformation::toolChain(m_makeStep->target()->kit());
|
||||||
|
|
||||||
if (tc) {
|
if (tc) {
|
||||||
|
|||||||
@@ -382,7 +382,7 @@ void SettingsDialog::createGui()
|
|||||||
headerHLayout->addWidget(m_headerLabel);
|
headerHLayout->addWidget(m_headerLabel);
|
||||||
|
|
||||||
m_stackedLayout->setMargin(0);
|
m_stackedLayout->setMargin(0);
|
||||||
m_stackedLayout->addWidget(new QWidget); // no category selected, for example when filtering
|
m_stackedLayout->addWidget(new QWidget(this)); // no category selected, for example when filtering
|
||||||
|
|
||||||
QDialogButtonBox *buttonBox = new QDialogButtonBox(QDialogButtonBox::Ok |
|
QDialogButtonBox *buttonBox = new QDialogButtonBox(QDialogButtonBox::Ok |
|
||||||
QDialogButtonBox::Apply |
|
QDialogButtonBox::Apply |
|
||||||
|
|||||||
@@ -306,9 +306,6 @@ MainWindow::~MainWindow()
|
|||||||
m_helpManager = 0;
|
m_helpManager = 0;
|
||||||
delete m_variableManager;
|
delete m_variableManager;
|
||||||
m_variableManager = 0;
|
m_variableManager = 0;
|
||||||
|
|
||||||
delete m_navigationWidget;
|
|
||||||
m_navigationWidget = 0;
|
|
||||||
}
|
}
|
||||||
|
|
||||||
bool MainWindow::init(QString *errorMessage)
|
bool MainWindow::init(QString *errorMessage)
|
||||||
|
|||||||
@@ -97,6 +97,9 @@ private slots:
|
|||||||
void test_SwitchMethodDeclarationDefinition_data();
|
void test_SwitchMethodDeclarationDefinition_data();
|
||||||
void test_SwitchMethodDeclarationDefinition();
|
void test_SwitchMethodDeclarationDefinition();
|
||||||
|
|
||||||
|
void test_FollowSymbolUnderCursor_multipleDocuments_data();
|
||||||
|
void test_FollowSymbolUnderCursor_multipleDocuments();
|
||||||
|
|
||||||
void test_FollowSymbolUnderCursor_data();
|
void test_FollowSymbolUnderCursor_data();
|
||||||
void test_FollowSymbolUnderCursor();
|
void test_FollowSymbolUnderCursor();
|
||||||
|
|
||||||
@@ -119,40 +122,19 @@ private slots:
|
|||||||
void test_doxygen_comments_data();
|
void test_doxygen_comments_data();
|
||||||
void test_doxygen_comments();
|
void test_doxygen_comments();
|
||||||
|
|
||||||
void test_quickfix_CompleteSwitchCaseStatement_basic1();
|
void test_quickfix_data();
|
||||||
void test_quickfix_CompleteSwitchCaseStatement_basic2();
|
void test_quickfix();
|
||||||
void test_quickfix_CompleteSwitchCaseStatement_oneValueMissing();
|
|
||||||
void test_quickfix_CompleteSwitchCaseStatement_QTCREATORBUG10366_1();
|
|
||||||
void test_quickfix_CompleteSwitchCaseStatement_QTCREATORBUG10366_2();
|
|
||||||
|
|
||||||
void test_quickfix_GenerateGetterSetter_basicGetterWithPrefix();
|
|
||||||
void test_quickfix_GenerateGetterSetter_basicGetterWithPrefixAndNamespace();
|
|
||||||
void test_quickfix_GenerateGetterSetter_basicGetterWithPrefixAndNamespaceToCpp();
|
void test_quickfix_GenerateGetterSetter_basicGetterWithPrefixAndNamespaceToCpp();
|
||||||
void test_quickfix_GenerateGetterSetter_basicGetterWithoutPrefix();
|
|
||||||
void test_quickfix_GenerateGetterSetter_customType();
|
|
||||||
void test_quickfix_GenerateGetterSetter_constMember();
|
|
||||||
void test_quickfix_GenerateGetterSetter_pointerToNonConst();
|
|
||||||
void test_quickfix_GenerateGetterSetter_pointerToConst();
|
|
||||||
void test_quickfix_GenerateGetterSetter_staticMember();
|
|
||||||
void test_quickfix_GenerateGetterSetter_secondDeclarator();
|
|
||||||
void test_quickfix_GenerateGetterSetter_triggeringRightAfterPointerSign();
|
|
||||||
void test_quickfix_GenerateGetterSetter_notTriggeringOnMemberFunction();
|
|
||||||
void test_quickfix_GenerateGetterSetter_notTriggeringOnMemberArray();
|
|
||||||
void test_quickfix_GenerateGetterSetter_notTriggeringWhenGetterOrSetterExist();
|
|
||||||
|
|
||||||
void test_quickfix_ReformatPointerDeclaration();
|
|
||||||
|
|
||||||
void test_quickfix_InsertDefFromDecl_basic();
|
|
||||||
void test_quickfix_InsertDefFromDecl_afterClass();
|
void test_quickfix_InsertDefFromDecl_afterClass();
|
||||||
void test_quickfix_InsertDefFromDecl_headerSource_basic1();
|
void test_quickfix_InsertDefFromDecl_headerSource_basic1();
|
||||||
void test_quickfix_InsertDefFromDecl_headerSource_basic2();
|
void test_quickfix_InsertDefFromDecl_headerSource_basic2();
|
||||||
void test_quickfix_InsertDefFromDecl_headerSource_basic3();
|
void test_quickfix_InsertDefFromDecl_headerSource_basic3();
|
||||||
void test_quickfix_InsertDefFromDecl_headerSource_namespace1();
|
void test_quickfix_InsertDefFromDecl_headerSource_namespace1();
|
||||||
void test_quickfix_InsertDefFromDecl_headerSource_namespace2();
|
void test_quickfix_InsertDefFromDecl_headerSource_namespace2();
|
||||||
void test_quickfix_InsertDefFromDecl_freeFunction();
|
|
||||||
void test_quickfix_InsertDefFromDecl_insideClass();
|
void test_quickfix_InsertDefFromDecl_insideClass();
|
||||||
void test_quickfix_InsertDefFromDecl_notTriggeringWhenDefinitionExists();
|
void test_quickfix_InsertDefFromDecl_notTriggeringWhenDefinitionExists();
|
||||||
void test_quickfix_InsertDefFromDecl_notTriggeringStatement();
|
|
||||||
void test_quickfix_InsertDefFromDecl_findRightImplementationFile();
|
void test_quickfix_InsertDefFromDecl_findRightImplementationFile();
|
||||||
void test_quickfix_InsertDefFromDecl_ignoreSurroundingGeneratedDeclarations();
|
void test_quickfix_InsertDefFromDecl_ignoreSurroundingGeneratedDeclarations();
|
||||||
void test_quickfix_InsertDefFromDecl_respectWsInOperatorNames1();
|
void test_quickfix_InsertDefFromDecl_respectWsInOperatorNames1();
|
||||||
@@ -212,54 +194,18 @@ private slots:
|
|||||||
void test_quickfix_MoveFuncDefToDecl_CtorWithInitialization();
|
void test_quickfix_MoveFuncDefToDecl_CtorWithInitialization();
|
||||||
void test_quickfix_MoveFuncDefToDecl_structWithAssignedVariable();
|
void test_quickfix_MoveFuncDefToDecl_structWithAssignedVariable();
|
||||||
|
|
||||||
void test_quickfix_AssignToLocalVariable_freeFunction();
|
|
||||||
void test_quickfix_AssignToLocalVariable_memberFunction();
|
|
||||||
void test_quickfix_AssignToLocalVariable_staticMemberFunction();
|
|
||||||
void test_quickfix_AssignToLocalVariable_newExpression();
|
|
||||||
void test_quickfix_AssignToLocalVariable_templates();
|
void test_quickfix_AssignToLocalVariable_templates();
|
||||||
void test_quickfix_AssignToLocalVariable_noInitializationList();
|
|
||||||
void test_quickfix_AssignToLocalVariable_noVoidFunction();
|
|
||||||
void test_quickfix_AssignToLocalVariable_noVoidMemberFunction();
|
|
||||||
void test_quickfix_AssignToLocalVariable_noVoidStaticMemberFunction();
|
|
||||||
void test_quickfix_AssignToLocalVariable_noFunctionInExpression();
|
|
||||||
void test_quickfix_AssignToLocalVariable_noFunctionInFunction();
|
|
||||||
void test_quickfix_AssignToLocalVariable_noReturnClass1();
|
|
||||||
void test_quickfix_AssignToLocalVariable_noReturnClass2();
|
|
||||||
void test_quickfix_AssignToLocalVariable_noReturnFunc1();
|
|
||||||
void test_quickfix_AssignToLocalVariable_noReturnFunc2();
|
|
||||||
void test_quickfix_AssignToLocalVariable_noSignatureMatch();
|
|
||||||
|
|
||||||
void test_quickfix_ExtractLiteralAsParameter_typeDeduction_data();
|
void test_quickfix_ExtractLiteralAsParameter_typeDeduction_data();
|
||||||
void test_quickfix_ExtractLiteralAsParameter_typeDeduction();
|
void test_quickfix_ExtractLiteralAsParameter_typeDeduction();
|
||||||
void test_quickfix_ExtractLiteralAsParameter_freeFunction();
|
|
||||||
void test_quickfix_ExtractLiteralAsParameter_freeFunction_separateFiles();
|
void test_quickfix_ExtractLiteralAsParameter_freeFunction_separateFiles();
|
||||||
void test_quickfix_ExtractLiteralAsParameter_memberFunction();
|
|
||||||
void test_quickfix_ExtractLiteralAsParameter_memberFunction_separateFiles();
|
void test_quickfix_ExtractLiteralAsParameter_memberFunction_separateFiles();
|
||||||
void test_quickfix_ExtractLiteralAsParameter_memberFunctionInline();
|
|
||||||
|
|
||||||
void test_quickfix_InsertVirtualMethods_onlyDecl();
|
void test_quickfix_InsertVirtualMethods_data();
|
||||||
void test_quickfix_InsertVirtualMethods_onlyDeclWithoutVirtual();
|
void test_quickfix_InsertVirtualMethods();
|
||||||
void test_quickfix_InsertVirtualMethods_Access();
|
|
||||||
void test_quickfix_InsertVirtualMethods_Superclass();
|
|
||||||
void test_quickfix_InsertVirtualMethods_SuperclassOverride();
|
|
||||||
void test_quickfix_InsertVirtualMethods_PureVirtualOnlyDecl();
|
|
||||||
void test_quickfix_InsertVirtualMethods_PureVirtualInside();
|
|
||||||
void test_quickfix_InsertVirtualMethods_inside();
|
|
||||||
void test_quickfix_InsertVirtualMethods_outside();
|
|
||||||
void test_quickfix_InsertVirtualMethods_implementationFile();
|
void test_quickfix_InsertVirtualMethods_implementationFile();
|
||||||
void test_quickfix_InsertVirtualMethods_notrigger_allImplemented();
|
|
||||||
void test_quickfix_InsertVirtualMethods_BaseClassInNamespace();
|
void test_quickfix_InsertVirtualMethods_BaseClassInNamespace();
|
||||||
|
|
||||||
void test_quickfix_OptimizeForLoop_postcrement();
|
|
||||||
void test_quickfix_OptimizeForLoop_condition();
|
|
||||||
void test_quickfix_OptimizeForLoop_flipedCondition();
|
|
||||||
void test_quickfix_OptimizeForLoop_alterVariableName();
|
|
||||||
void test_quickfix_OptimizeForLoop_optimizeBoth();
|
|
||||||
void test_quickfix_OptimizeForLoop_emptyInitializer();
|
|
||||||
void test_quickfix_OptimizeForLoop_wrongInitializer();
|
|
||||||
void test_quickfix_OptimizeForLoop_noTriggerNumeric1();
|
|
||||||
void test_quickfix_OptimizeForLoop_noTriggerNumeric2();
|
|
||||||
|
|
||||||
void test_functionhelper_virtualFunctions();
|
void test_functionhelper_virtualFunctions();
|
||||||
void test_functionhelper_virtualFunctions_data();
|
void test_functionhelper_virtualFunctions_data();
|
||||||
|
|
||||||
|
|||||||
@@ -242,6 +242,24 @@ Link findMacroLink(const QByteArray &name, const Document::Ptr &doc)
|
|||||||
return Link();
|
return Link();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/// Considers also forward declared templates.
|
||||||
|
static bool isForwardClassDeclaration(Type *type)
|
||||||
|
{
|
||||||
|
if (!type)
|
||||||
|
return false;
|
||||||
|
|
||||||
|
if (type->isForwardClassDeclarationType()) {
|
||||||
|
return true;
|
||||||
|
} else if (Template *templ = type->asTemplateType()) {
|
||||||
|
if (Symbol *declaration = templ->declaration()) {
|
||||||
|
if (declaration->isForwardClassDeclaration())
|
||||||
|
return true;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
return false;
|
||||||
|
}
|
||||||
|
|
||||||
inline LookupItem skipForwardDeclarations(const QList<LookupItem> &resolvedSymbols)
|
inline LookupItem skipForwardDeclarations(const QList<LookupItem> &resolvedSymbols)
|
||||||
{
|
{
|
||||||
QList<LookupItem> candidates = resolvedSymbols;
|
QList<LookupItem> candidates = resolvedSymbols;
|
||||||
@@ -249,11 +267,11 @@ inline LookupItem skipForwardDeclarations(const QList<LookupItem> &resolvedSymbo
|
|||||||
LookupItem result = candidates.first();
|
LookupItem result = candidates.first();
|
||||||
const FullySpecifiedType ty = result.type().simplified();
|
const FullySpecifiedType ty = result.type().simplified();
|
||||||
|
|
||||||
if (ty->isForwardClassDeclarationType()) {
|
if (isForwardClassDeclaration(ty.type())) {
|
||||||
while (!candidates.isEmpty()) {
|
while (!candidates.isEmpty()) {
|
||||||
LookupItem r = candidates.takeFirst();
|
LookupItem r = candidates.takeFirst();
|
||||||
|
|
||||||
if (!r.type()->isForwardClassDeclarationType()) {
|
if (!isForwardClassDeclaration(r.type().type())) {
|
||||||
result = r;
|
result = r;
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
@@ -676,8 +694,15 @@ BaseTextEditorWidget::Link FollowSymbolUnderCursor::findLink(const QTextCursor &
|
|||||||
if (def == lastVisibleSymbol)
|
if (def == lastVisibleSymbol)
|
||||||
def = 0; // jump to declaration then.
|
def = 0; // jump to declaration then.
|
||||||
|
|
||||||
if (symbol->isForwardClassDeclaration())
|
if (symbol->isForwardClassDeclaration()) {
|
||||||
def = symbolFinder->findMatchingClassDeclaration(symbol, snapshot);
|
def = symbolFinder->findMatchingClassDeclaration(symbol, snapshot);
|
||||||
|
} else if (Template *templ = symbol->asTemplate()) {
|
||||||
|
if (Symbol *declaration = templ->declaration()) {
|
||||||
|
if (declaration->isForwardClassDeclaration())
|
||||||
|
def = symbolFinder->findMatchingClassDeclaration(declaration, snapshot);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
link = m_widget->linkToSymbol(def ? def : symbol);
|
link = m_widget->linkToSymbol(def ? def : symbol);
|
||||||
|
|||||||
File diff suppressed because it is too large
Load Diff
@@ -774,6 +774,11 @@ public:
|
|||||||
setDescription(QApplication::translate("CppTools::QuickFix",
|
setDescription(QApplication::translate("CppTools::QuickFix",
|
||||||
"Move Declaration out of Condition"));
|
"Move Declaration out of Condition"));
|
||||||
|
|
||||||
|
reset();
|
||||||
|
}
|
||||||
|
|
||||||
|
void reset()
|
||||||
|
{
|
||||||
condition = mk.Condition();
|
condition = mk.Condition();
|
||||||
pattern = mk.IfStatement(condition);
|
pattern = mk.IfStatement(condition);
|
||||||
}
|
}
|
||||||
@@ -826,6 +831,8 @@ void MoveDeclarationOutOfIf::match(const CppQuickFixInterface &interface,
|
|||||||
result.append(op);
|
result.append(op);
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
op->reset();
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@@ -841,7 +848,11 @@ public:
|
|||||||
{
|
{
|
||||||
setDescription(QApplication::translate("CppTools::QuickFix",
|
setDescription(QApplication::translate("CppTools::QuickFix",
|
||||||
"Move Declaration out of Condition"));
|
"Move Declaration out of Condition"));
|
||||||
|
reset();
|
||||||
|
}
|
||||||
|
|
||||||
|
void reset()
|
||||||
|
{
|
||||||
condition = mk.Condition();
|
condition = mk.Condition();
|
||||||
pattern = mk.WhileStatement(condition);
|
pattern = mk.WhileStatement(condition);
|
||||||
}
|
}
|
||||||
@@ -903,6 +914,8 @@ void MoveDeclarationOutOfWhile::match(const CppQuickFixInterface &interface,
|
|||||||
result.append(op);
|
result.append(op);
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
op->reset();
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -465,6 +465,8 @@ void TestCase::run()
|
|||||||
|
|
||||||
} // anonymous namespace
|
} // anonymous namespace
|
||||||
|
|
||||||
|
Q_DECLARE_METATYPE(QList<TestDocumentPtr>)
|
||||||
|
|
||||||
void CppEditorPlugin::test_SwitchMethodDeclarationDefinition_data()
|
void CppEditorPlugin::test_SwitchMethodDeclarationDefinition_data()
|
||||||
{
|
{
|
||||||
QTest::addColumn<QByteArray>("header");
|
QTest::addColumn<QByteArray>("header");
|
||||||
@@ -870,6 +872,18 @@ void CppEditorPlugin::test_FollowSymbolUnderCursor_data()
|
|||||||
"}\n"
|
"}\n"
|
||||||
);
|
);
|
||||||
|
|
||||||
|
QTest::newRow("skipForwardDeclarationBasic") << _(
|
||||||
|
"class $Foo {};\n"
|
||||||
|
"class Foo;\n"
|
||||||
|
"@Foo foo;\n"
|
||||||
|
);
|
||||||
|
|
||||||
|
QTest::newRow("skipForwardDeclarationTemplates") << _(
|
||||||
|
"template <class E> class $Container {};\n"
|
||||||
|
"template <class E> class Container;\n"
|
||||||
|
"@Container<int> container;\n"
|
||||||
|
);
|
||||||
|
|
||||||
QTest::newRow("using_QTCREATORBUG7903_globalNamespace") << _(
|
QTest::newRow("using_QTCREATORBUG7903_globalNamespace") << _(
|
||||||
"namespace NS {\n"
|
"namespace NS {\n"
|
||||||
"class Foo {};\n"
|
"class Foo {};\n"
|
||||||
@@ -904,7 +918,6 @@ void CppEditorPlugin::test_FollowSymbolUnderCursor_data()
|
|||||||
" @Foo foo;\n"
|
" @Foo foo;\n"
|
||||||
"}\n"
|
"}\n"
|
||||||
);
|
);
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
void CppEditorPlugin::test_FollowSymbolUnderCursor()
|
void CppEditorPlugin::test_FollowSymbolUnderCursor()
|
||||||
@@ -914,6 +927,35 @@ void CppEditorPlugin::test_FollowSymbolUnderCursor()
|
|||||||
test.run();
|
test.run();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
void CppEditorPlugin::test_FollowSymbolUnderCursor_multipleDocuments_data()
|
||||||
|
{
|
||||||
|
QTest::addColumn<QList<TestDocumentPtr> >("documents");
|
||||||
|
|
||||||
|
QTest::newRow("skipForwardDeclarationBasic") << (QList<TestDocumentPtr>()
|
||||||
|
<< TestDocument::create("class $Foo {};\n",
|
||||||
|
QLatin1String("defined.h"))
|
||||||
|
<< TestDocument::create("class Foo;\n"
|
||||||
|
"@Foo foo;\n",
|
||||||
|
QLatin1String("forwardDeclaredAndUsed.h"))
|
||||||
|
);
|
||||||
|
|
||||||
|
QTest::newRow("skipForwardDeclarationTemplates") << (QList<TestDocumentPtr>()
|
||||||
|
<< TestDocument::create("template <class E> class $Container {};\n",
|
||||||
|
QLatin1String("defined.h"))
|
||||||
|
<< TestDocument::create("template <class E> class Container;\n"
|
||||||
|
"@Container<int> container;\n",
|
||||||
|
QLatin1String("forwardDeclaredAndUsed.h"))
|
||||||
|
);
|
||||||
|
}
|
||||||
|
|
||||||
|
void CppEditorPlugin::test_FollowSymbolUnderCursor_multipleDocuments()
|
||||||
|
{
|
||||||
|
QFETCH(QList<TestDocumentPtr>, documents);
|
||||||
|
|
||||||
|
TestCase test(TestCase::FollowSymbolUnderCursorAction, documents);
|
||||||
|
test.run();
|
||||||
|
}
|
||||||
|
|
||||||
void CppEditorPlugin::test_FollowSymbolUnderCursor_QObject_connect_data()
|
void CppEditorPlugin::test_FollowSymbolUnderCursor_QObject_connect_data()
|
||||||
{
|
{
|
||||||
#define TAG(str) secondQObjectParam ? str : str ", no 2nd QObject"
|
#define TAG(str) secondQObjectParam ? str : str ", no 2nd QObject"
|
||||||
|
|||||||
@@ -85,6 +85,12 @@ static const char decorateOption[] = "--decorate";
|
|||||||
namespace Git {
|
namespace Git {
|
||||||
namespace Internal {
|
namespace Internal {
|
||||||
|
|
||||||
|
// Suppress git diff warnings about "LF will be replaced by CRLF..." on Windows.
|
||||||
|
static inline unsigned diffExecutionFlags()
|
||||||
|
{
|
||||||
|
return Utils::HostOsInfo::isWindowsHost() ? unsigned(VcsBase::VcsBasePlugin::SuppressStdErrInLogWindow) : 0u;
|
||||||
|
}
|
||||||
|
|
||||||
using VcsBase::VcsBasePlugin;
|
using VcsBase::VcsBasePlugin;
|
||||||
|
|
||||||
class GitDiffSwitcher : public QObject
|
class GitDiffSwitcher : public QObject
|
||||||
@@ -391,6 +397,7 @@ void GitDiffHandler::collectFilesList(const QStringList &additionalArguments)
|
|||||||
QStringList arguments;
|
QStringList arguments;
|
||||||
arguments << QLatin1String("diff") << QLatin1String("--name-only") << additionalArguments;
|
arguments << QLatin1String("diff") << QLatin1String("--name-only") << additionalArguments;
|
||||||
command->addJob(arguments, m_timeout);
|
command->addJob(arguments, m_timeout);
|
||||||
|
command->addFlags(diffExecutionFlags());
|
||||||
command->execute();
|
command->execute();
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -1186,6 +1193,7 @@ void GitClient::diff(const QString &workingDirectory,
|
|||||||
command->addJob(arguments, timeout);
|
command->addJob(arguments, timeout);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
command->addFlags(diffExecutionFlags());
|
||||||
command->execute();
|
command->execute();
|
||||||
}
|
}
|
||||||
if (newEditor) {
|
if (newEditor) {
|
||||||
@@ -1256,7 +1264,7 @@ void GitClient::diff(const QString &workingDirectory, const QString &fileName)
|
|||||||
|
|
||||||
if (!fileName.isEmpty())
|
if (!fileName.isEmpty())
|
||||||
cmdArgs << QLatin1String("--") << fileName;
|
cmdArgs << QLatin1String("--") << fileName;
|
||||||
executeGit(workingDirectory, cmdArgs, vcsEditor);
|
executeGit(workingDirectory, cmdArgs, vcsEditor, false, diffExecutionFlags());
|
||||||
}
|
}
|
||||||
if (newEditor) {
|
if (newEditor) {
|
||||||
GitDiffSwitcher *switcher = new GitDiffSwitcher(newEditor, this);
|
GitDiffSwitcher *switcher = new GitDiffSwitcher(newEditor, this);
|
||||||
@@ -1315,7 +1323,7 @@ void GitClient::diffBranch(const QString &workingDirectory,
|
|||||||
<< vcsEditor->configurationWidget()->arguments()
|
<< vcsEditor->configurationWidget()->arguments()
|
||||||
<< branchName;
|
<< branchName;
|
||||||
|
|
||||||
executeGit(workingDirectory, cmdArgs, vcsEditor);
|
executeGit(workingDirectory, cmdArgs, vcsEditor, false, diffExecutionFlags());
|
||||||
}
|
}
|
||||||
if (newEditor) {
|
if (newEditor) {
|
||||||
GitDiffSwitcher *switcher = new GitDiffSwitcher(newEditor, this);
|
GitDiffSwitcher *switcher = new GitDiffSwitcher(newEditor, this);
|
||||||
@@ -1537,7 +1545,7 @@ void GitClient::blame(const QString &workingDirectory,
|
|||||||
arguments << QLatin1String("--") << fileName;
|
arguments << QLatin1String("--") << fileName;
|
||||||
if (!revision.isEmpty())
|
if (!revision.isEmpty())
|
||||||
arguments << revision;
|
arguments << revision;
|
||||||
executeGit(workingDirectory, arguments, editor, false, false, lineNumber);
|
executeGit(workingDirectory, arguments, editor, false, 0, lineNumber);
|
||||||
}
|
}
|
||||||
|
|
||||||
bool GitClient::synchronousCheckout(const QString &workingDirectory,
|
bool GitClient::synchronousCheckout(const QString &workingDirectory,
|
||||||
@@ -1626,7 +1634,10 @@ void GitClient::reset(const QString &workingDirectory, const QString &argument,
|
|||||||
if (!commit.isEmpty())
|
if (!commit.isEmpty())
|
||||||
arguments << commit;
|
arguments << commit;
|
||||||
|
|
||||||
executeGit(workingDirectory, arguments, 0, true, argument == QLatin1String("--hard"));
|
unsigned flags = 0;
|
||||||
|
if (argument == QLatin1String("--hard"))
|
||||||
|
flags |= VcsBasePlugin::ExpectRepoChanges;
|
||||||
|
executeGit(workingDirectory, arguments, 0, true, flags);
|
||||||
}
|
}
|
||||||
|
|
||||||
void GitClient::addFile(const QString &workingDirectory, const QString &fileName)
|
void GitClient::addFile(const QString &workingDirectory, const QString &fileName)
|
||||||
@@ -2489,14 +2500,13 @@ VcsBase::Command *GitClient::executeGit(const QString &workingDirectory,
|
|||||||
const QStringList &arguments,
|
const QStringList &arguments,
|
||||||
VcsBase::VcsBaseEditorWidget* editor,
|
VcsBase::VcsBaseEditorWidget* editor,
|
||||||
bool useOutputToWindow,
|
bool useOutputToWindow,
|
||||||
bool expectChanges,
|
unsigned additionalFlags,
|
||||||
int editorLineNumber)
|
int editorLineNumber)
|
||||||
{
|
{
|
||||||
outputWindow()->appendCommand(workingDirectory, settings()->stringValue(GitSettings::binaryPathKey), arguments);
|
outputWindow()->appendCommand(workingDirectory, settings()->stringValue(GitSettings::binaryPathKey), arguments);
|
||||||
VcsBase::Command *command = createCommand(workingDirectory, editor, useOutputToWindow, editorLineNumber);
|
VcsBase::Command *command = createCommand(workingDirectory, editor, useOutputToWindow, editorLineNumber);
|
||||||
command->addJob(arguments, settings()->intValue(GitSettings::timeoutKey));
|
command->addJob(arguments, settings()->intValue(GitSettings::timeoutKey));
|
||||||
if (expectChanges)
|
command->addFlags(additionalFlags);
|
||||||
command->addFlags(VcsBasePlugin::ExpectRepoChanges);
|
|
||||||
command->execute();
|
command->execute();
|
||||||
return command;
|
return command;
|
||||||
}
|
}
|
||||||
@@ -2626,7 +2636,8 @@ void GitClient::updateSubmodulesIfNeeded(const QString &workingDirectory, bool p
|
|||||||
QStringList arguments;
|
QStringList arguments;
|
||||||
arguments << QLatin1String("submodule") << QLatin1String("update");
|
arguments << QLatin1String("submodule") << QLatin1String("update");
|
||||||
|
|
||||||
VcsBase::Command *cmd = executeGit(workingDirectory, arguments, 0, true, true);
|
VcsBase::Command *cmd = executeGit(workingDirectory, arguments, 0, true,
|
||||||
|
VcsBasePlugin::ExpectRepoChanges);
|
||||||
connect(cmd, SIGNAL(finished(bool,int,QVariant)), this, SLOT(finishSubmoduleUpdate()));
|
connect(cmd, SIGNAL(finished(bool,int,QVariant)), this, SLOT(finishSubmoduleUpdate()));
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -3578,7 +3589,8 @@ void GitClient::stashPop(const QString &workingDirectory, const QString &stash)
|
|||||||
arguments << QLatin1String("pop");
|
arguments << QLatin1String("pop");
|
||||||
if (!stash.isEmpty())
|
if (!stash.isEmpty())
|
||||||
arguments << stash;
|
arguments << stash;
|
||||||
VcsBase::Command *cmd = executeGit(workingDirectory, arguments, 0, true, true);
|
VcsBase::Command *cmd = executeGit(workingDirectory, arguments, 0, true,
|
||||||
|
VcsBasePlugin::ExpectRepoChanges);
|
||||||
new ConflictHandler(cmd, workingDirectory);
|
new ConflictHandler(cmd, workingDirectory);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
@@ -374,7 +374,7 @@ private:
|
|||||||
const QStringList &arguments,
|
const QStringList &arguments,
|
||||||
VcsBase::VcsBaseEditorWidget* editor = 0,
|
VcsBase::VcsBaseEditorWidget* editor = 0,
|
||||||
bool useOutputToWindow = false,
|
bool useOutputToWindow = false,
|
||||||
bool expectChanges = false,
|
unsigned additionalFlags = 0,
|
||||||
int editorLineNumber = -1);
|
int editorLineNumber = -1);
|
||||||
|
|
||||||
// Fully synchronous git execution (QProcess-based).
|
// Fully synchronous git execution (QProcess-based).
|
||||||
|
|||||||
@@ -75,6 +75,7 @@ IosDeployStep::~IosDeployStep() { }
|
|||||||
|
|
||||||
void IosDeployStep::ctor()
|
void IosDeployStep::ctor()
|
||||||
{
|
{
|
||||||
|
m_toolHandler = 0;
|
||||||
m_transferStatus = NoTransfer;
|
m_transferStatus = NoTransfer;
|
||||||
m_device = ProjectExplorer::DeviceKitInformation::device(target()->kit());
|
m_device = ProjectExplorer::DeviceKitInformation::device(target()->kit());
|
||||||
const QString devName = m_device.isNull() ? IosDevice::name() : m_device->displayName();
|
const QString devName = m_device.isNull() ? IosDevice::name() : m_device->displayName();
|
||||||
@@ -103,23 +104,24 @@ void IosDeployStep::run(QFutureInterface<bool> &fi)
|
|||||||
ProjectExplorer::Constants::TASK_CATEGORY_DEPLOYMENT);
|
ProjectExplorer::Constants::TASK_CATEGORY_DEPLOYMENT);
|
||||||
m_futureInterface.reportResult(!iossimulator().isNull());
|
m_futureInterface.reportResult(!iossimulator().isNull());
|
||||||
cleanup();
|
cleanup();
|
||||||
m_futureInterface.reportFinished();
|
emit finished();
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
m_transferStatus = TransferInProgress;
|
m_transferStatus = TransferInProgress;
|
||||||
IosToolHandler *toolHandler = new IosToolHandler(IosToolHandler::IosDeviceType, this);
|
QTC_CHECK(m_toolHandler == 0);
|
||||||
|
m_toolHandler = new IosToolHandler(IosToolHandler::IosDeviceType, this);
|
||||||
m_futureInterface.setProgressRange(0, 200);
|
m_futureInterface.setProgressRange(0, 200);
|
||||||
m_futureInterface.setProgressValueAndText(0, QLatin1String("Transferring application"));
|
m_futureInterface.setProgressValueAndText(0, QLatin1String("Transferring application"));
|
||||||
m_futureInterface.reportStarted();
|
m_futureInterface.reportStarted();
|
||||||
connect(toolHandler, SIGNAL(isTransferringApp(Ios::IosToolHandler*,QString,QString,int,int,QString)),
|
connect(m_toolHandler, SIGNAL(isTransferringApp(Ios::IosToolHandler*,QString,QString,int,int,QString)),
|
||||||
SLOT(handleIsTransferringApp(Ios::IosToolHandler*,QString,QString,int,int,QString)));
|
SLOT(handleIsTransferringApp(Ios::IosToolHandler*,QString,QString,int,int,QString)));
|
||||||
connect(toolHandler, SIGNAL(didTransferApp(Ios::IosToolHandler*,QString,QString,Ios::IosToolHandler::OpStatus)),
|
connect(m_toolHandler, SIGNAL(didTransferApp(Ios::IosToolHandler*,QString,QString,Ios::IosToolHandler::OpStatus)),
|
||||||
SLOT(handleDidTransferApp(Ios::IosToolHandler*,QString,QString,Ios::IosToolHandler::OpStatus)));
|
SLOT(handleDidTransferApp(Ios::IosToolHandler*,QString,QString,Ios::IosToolHandler::OpStatus)));
|
||||||
connect(toolHandler, SIGNAL(finished(Ios::IosToolHandler*)),
|
connect(m_toolHandler, SIGNAL(finished(Ios::IosToolHandler*)),
|
||||||
SLOT(handleFinished(Ios::IosToolHandler*)));
|
SLOT(handleFinished(Ios::IosToolHandler*)));
|
||||||
connect(toolHandler, SIGNAL(errorMsg(Ios::IosToolHandler*,QString)),
|
connect(m_toolHandler, SIGNAL(errorMsg(Ios::IosToolHandler*,QString)),
|
||||||
SLOT(handleErrorMsg(Ios::IosToolHandler*,QString)));
|
SLOT(handleErrorMsg(Ios::IosToolHandler*,QString)));
|
||||||
toolHandler->requestTransferApp(appBundle(), deviceId());
|
m_toolHandler->requestTransferApp(appBundle(), deviceId());
|
||||||
}
|
}
|
||||||
|
|
||||||
void IosDeployStep::cancel()
|
void IosDeployStep::cancel()
|
||||||
@@ -179,7 +181,7 @@ void IosDeployStep::handleFinished(IosToolHandler *handler)
|
|||||||
cleanup();
|
cleanup();
|
||||||
handler->deleteLater();
|
handler->deleteLater();
|
||||||
// move it when result is reported? (would need care to avoid problems with concurrent runs)
|
// move it when result is reported? (would need care to avoid problems with concurrent runs)
|
||||||
m_futureInterface.reportFinished();
|
emit finished();
|
||||||
}
|
}
|
||||||
|
|
||||||
void IosDeployStep::handleErrorMsg(IosToolHandler *handler, const QString &msg)
|
void IosDeployStep::handleErrorMsg(IosToolHandler *handler, const QString &msg)
|
||||||
|
|||||||
@@ -85,7 +85,7 @@ IosDevice::IosDevice()
|
|||||||
Constants::IOS_DEVICE_ID)
|
Constants::IOS_DEVICE_ID)
|
||||||
{
|
{
|
||||||
setDisplayName(IosDevice::name());
|
setDisplayName(IosDevice::name());
|
||||||
setDeviceState(DeviceStateUnknown);
|
setDeviceState(DeviceDisconnected);
|
||||||
}
|
}
|
||||||
|
|
||||||
IosDevice::IosDevice(const IosDevice &other)
|
IosDevice::IosDevice(const IosDevice &other)
|
||||||
@@ -99,7 +99,7 @@ IosDevice::IosDevice(const QString &uid)
|
|||||||
Core::Id(Constants::IOS_DEVICE_ID).withSuffix(uid))
|
Core::Id(Constants::IOS_DEVICE_ID).withSuffix(uid))
|
||||||
{
|
{
|
||||||
setDisplayName(IosDevice::name());
|
setDisplayName(IosDevice::name());
|
||||||
setDeviceState(DeviceStateUnknown);
|
setDeviceState(DeviceDisconnected);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
|||||||
@@ -49,6 +49,7 @@ IosSimulator::IosSimulator(Core::Id id, Utils::FileName simulatorPath)
|
|||||||
m_simulatorPath(simulatorPath)
|
m_simulatorPath(simulatorPath)
|
||||||
{
|
{
|
||||||
setDisplayName(QCoreApplication::translate("Ios::Internal::IosSimulator", "iOS Simulator"));
|
setDisplayName(QCoreApplication::translate("Ios::Internal::IosSimulator", "iOS Simulator"));
|
||||||
|
setDeviceState(DeviceReadyToUse);
|
||||||
}
|
}
|
||||||
|
|
||||||
IosSimulator::IosSimulator()
|
IosSimulator::IosSimulator()
|
||||||
@@ -65,6 +66,7 @@ IosSimulator::IosSimulator(const IosSimulator &other)
|
|||||||
: IDevice(other)
|
: IDevice(other)
|
||||||
{
|
{
|
||||||
setDisplayName(QCoreApplication::translate("Ios::Internal::IosSimulator", "iOS Simulator"));
|
setDisplayName(QCoreApplication::translate("Ios::Internal::IosSimulator", "iOS Simulator"));
|
||||||
|
setDeviceState(DeviceReadyToUse);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
|||||||
@@ -250,8 +250,16 @@ Target *BuildConfiguration::target() const
|
|||||||
Utils::Environment BuildConfiguration::baseEnvironment() const
|
Utils::Environment BuildConfiguration::baseEnvironment() const
|
||||||
{
|
{
|
||||||
Utils::Environment result;
|
Utils::Environment result;
|
||||||
if (useSystemEnvironment())
|
if (useSystemEnvironment()) {
|
||||||
|
#if 1
|
||||||
|
// workaround for QTBUG-35143
|
||||||
result = Utils::Environment::systemEnvironment();
|
result = Utils::Environment::systemEnvironment();
|
||||||
|
result.unset(QLatin1String("QSG_RENDER_LOOP"));
|
||||||
|
#else
|
||||||
|
result = Utils::Environment::systemEnvironment();
|
||||||
|
#endif
|
||||||
|
}
|
||||||
|
|
||||||
target()->kit()->addToEnvironment(result);
|
target()->kit()->addToEnvironment(result);
|
||||||
return result;
|
return result;
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -100,10 +100,11 @@ void KitChooser::populate()
|
|||||||
m_chooser->setItemData(m_chooser->count() - 1, kitToolTip(kit), Qt::ToolTipRole);
|
m_chooser->setItemData(m_chooser->count() - 1, kitToolTip(kit), Qt::ToolTipRole);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
m_chooser->setEnabled(m_chooser->count() > 1);
|
|
||||||
|
|
||||||
|
const int n = m_chooser->count();
|
||||||
const int index = Core::ICore::settings()->value(QLatin1String(lastKitKey)).toInt();
|
const int index = Core::ICore::settings()->value(QLatin1String(lastKitKey)).toInt();
|
||||||
m_chooser->setCurrentIndex(qMin(index, m_chooser->count()));
|
m_chooser->setCurrentIndex(0 <= index && index < n ? index : -1);
|
||||||
|
m_chooser->setEnabled(n > 1);
|
||||||
}
|
}
|
||||||
|
|
||||||
Kit *KitChooser::currentKit() const
|
Kit *KitChooser::currentKit() const
|
||||||
|
|||||||
@@ -69,11 +69,23 @@ Utils::Environment LocalEnvironmentAspect::baseEnvironment() const
|
|||||||
if (BuildConfiguration *bc = runConfiguration()->target()->activeBuildConfiguration()) {
|
if (BuildConfiguration *bc = runConfiguration()->target()->activeBuildConfiguration()) {
|
||||||
env = bc->environment();
|
env = bc->environment();
|
||||||
} else { // Fallback for targets without buildconfigurations:
|
} else { // Fallback for targets without buildconfigurations:
|
||||||
|
#if 1
|
||||||
|
// workaround for QTBUG-35143
|
||||||
env = Utils::Environment::systemEnvironment();
|
env = Utils::Environment::systemEnvironment();
|
||||||
|
env.unset(QLatin1String("QSG_RENDER_LOOP"));
|
||||||
|
#else
|
||||||
|
env = Utils::Environment::systemEnvironment();
|
||||||
|
#endif
|
||||||
runConfiguration()->target()->kit()->addToEnvironment(env);
|
runConfiguration()->target()->kit()->addToEnvironment(env);
|
||||||
}
|
}
|
||||||
} else if (base == static_cast<int>(SystemEnvironmentBase)) {
|
} else if (base == static_cast<int>(SystemEnvironmentBase)) {
|
||||||
|
#if 1
|
||||||
|
// workaround for QTBUG-35143
|
||||||
env = Utils::Environment::systemEnvironment();
|
env = Utils::Environment::systemEnvironment();
|
||||||
|
env.unset(QLatin1String("QSG_RENDER_LOOP"));
|
||||||
|
#else
|
||||||
|
env = Utils::Environment::systemEnvironment();
|
||||||
|
#endif
|
||||||
}
|
}
|
||||||
|
|
||||||
if (const LocalApplicationRunConfiguration *rc = qobject_cast<const LocalApplicationRunConfiguration *>(runConfiguration()))
|
if (const LocalApplicationRunConfiguration *rc = qobject_cast<const LocalApplicationRunConfiguration *>(runConfiguration()))
|
||||||
|
|||||||
@@ -59,21 +59,42 @@
|
|||||||
#include <QAction>
|
#include <QAction>
|
||||||
#include <QItemDelegate>
|
#include <QItemDelegate>
|
||||||
|
|
||||||
|
#if QT_VERSION >= 0x050100
|
||||||
|
#include <QGuiApplication>
|
||||||
|
#endif
|
||||||
|
|
||||||
static QIcon createCenteredIcon(const QIcon &icon, const QIcon &overlay)
|
static QIcon createCenteredIcon(const QIcon &icon, const QIcon &overlay)
|
||||||
{
|
{
|
||||||
QPixmap targetPixmap;
|
QPixmap targetPixmap;
|
||||||
targetPixmap = QPixmap(Core::Constants::TARGET_ICON_SIZE, Core::Constants::TARGET_ICON_SIZE);
|
qreal appDevicePixelRatio = 1.0;
|
||||||
|
#if QT_VERSION >= 0x050100
|
||||||
|
appDevicePixelRatio = qApp->devicePixelRatio();
|
||||||
|
#endif
|
||||||
|
int deviceSpaceIconSize = Core::Constants::TARGET_ICON_SIZE * appDevicePixelRatio;
|
||||||
|
targetPixmap = QPixmap(deviceSpaceIconSize, deviceSpaceIconSize);
|
||||||
|
#if QT_VERSION >= 0x050100
|
||||||
|
targetPixmap.setDevicePixelRatio(appDevicePixelRatio);
|
||||||
|
#endif
|
||||||
targetPixmap.fill(Qt::transparent);
|
targetPixmap.fill(Qt::transparent);
|
||||||
QPainter painter(&targetPixmap);
|
QPainter painter(&targetPixmap); // painter in user space
|
||||||
|
|
||||||
QPixmap pixmap = icon.pixmap(Core::Constants::TARGET_ICON_SIZE);
|
QPixmap pixmap = icon.pixmap(Core::Constants::TARGET_ICON_SIZE); // already takes app devicePixelRatio into account
|
||||||
painter.drawPixmap((Core::Constants::TARGET_ICON_SIZE - pixmap.width())/2,
|
qreal pixmapDevicePixelRatio = 1.0;
|
||||||
(Core::Constants::TARGET_ICON_SIZE - pixmap.height())/2, pixmap);
|
#if QT_VERSION >= 0x050100
|
||||||
|
pixmapDevicePixelRatio = pixmap.devicePixelRatio();
|
||||||
|
#endif
|
||||||
|
painter.drawPixmap((Core::Constants::TARGET_ICON_SIZE - pixmap.width() / pixmapDevicePixelRatio) / 2,
|
||||||
|
(Core::Constants::TARGET_ICON_SIZE - pixmap.height() / pixmapDevicePixelRatio) / 2, pixmap);
|
||||||
if (!overlay.isNull()) {
|
if (!overlay.isNull()) {
|
||||||
pixmap = overlay.pixmap(Core::Constants::TARGET_ICON_SIZE);
|
pixmap = overlay.pixmap(Core::Constants::TARGET_ICON_SIZE); // already takes app devicePixelRatio into account
|
||||||
painter.drawPixmap((Core::Constants::TARGET_ICON_SIZE - pixmap.width())/2,
|
pixmapDevicePixelRatio = 1.0;
|
||||||
(Core::Constants::TARGET_ICON_SIZE - pixmap.height())/2, pixmap);
|
#if QT_VERSION >= 0x050100
|
||||||
|
pixmapDevicePixelRatio = pixmap.devicePixelRatio();
|
||||||
|
#endif
|
||||||
|
painter.drawPixmap((Core::Constants::TARGET_ICON_SIZE - pixmap.width() / pixmapDevicePixelRatio) / 2,
|
||||||
|
(Core::Constants::TARGET_ICON_SIZE - pixmap.height() / pixmapDevicePixelRatio) / 2, pixmap);
|
||||||
}
|
}
|
||||||
|
|
||||||
return QIcon(targetPixmap);
|
return QIcon(targetPixmap);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
@@ -89,8 +89,8 @@ QmakeBuildConfiguration *enableActiveQmakeBuildConfiguration(ProjectExplorer::Ta
|
|||||||
|
|
||||||
void updateBoilerPlateCodeFiles(const AbstractMobileApp *app, const QString &proFile)
|
void updateBoilerPlateCodeFiles(const AbstractMobileApp *app, const QString &proFile)
|
||||||
{
|
{
|
||||||
const QList<AbstractGeneratedFileInfo> updates =
|
const QList<AbstractGeneratedFileInfo> updates = app->fileUpdates(proFile);
|
||||||
app->fileUpdates(proFile);
|
const QString nativeProFile = QDir::toNativeSeparators(proFile);
|
||||||
if (!updates.empty()) {
|
if (!updates.empty()) {
|
||||||
const QString title = QmakeManager::tr("Update of Generated Files");
|
const QString title = QmakeManager::tr("Update of Generated Files");
|
||||||
QStringList fileNames;
|
QStringList fileNames;
|
||||||
@@ -100,7 +100,7 @@ void updateBoilerPlateCodeFiles(const AbstractMobileApp *app, const QString &pro
|
|||||||
QmakeManager::tr("In project<br><br>%1<br><br>The following files are either "
|
QmakeManager::tr("In project<br><br>%1<br><br>The following files are either "
|
||||||
"outdated or have been modified:<br><br>%2<br><br>Do you want "
|
"outdated or have been modified:<br><br>%2<br><br>Do you want "
|
||||||
"Qt Creator to update the files? Any changes will be lost.")
|
"Qt Creator to update the files? Any changes will be lost.")
|
||||||
.arg(proFile, fileNames.join(QLatin1String(", ")));
|
.arg(nativeProFile, fileNames.join(QLatin1String(", ")));
|
||||||
if (QMessageBox::question(0, title, message, QMessageBox::Yes | QMessageBox::No) == QMessageBox::Yes) {
|
if (QMessageBox::question(0, title, message, QMessageBox::Yes | QMessageBox::No) == QMessageBox::Yes) {
|
||||||
QString error;
|
QString error;
|
||||||
if (!app->updateFiles(updates, error))
|
if (!app->updateFiles(updates, error))
|
||||||
|
|||||||
@@ -204,10 +204,7 @@ void StatesEditorView::addState()
|
|||||||
|
|
||||||
try {
|
try {
|
||||||
if ((rootStateGroup().allStates().count() < 1) && //QtQuick import might be missing
|
if ((rootStateGroup().allStates().count() < 1) && //QtQuick import might be missing
|
||||||
(!model()->hasImport(Import::createLibraryImport("QtQuick", "1.0"), true)
|
(!model()->hasImport(Import::createLibraryImport("QtQuick", "1.0"), true, true)))
|
||||||
&& !model()->hasImport(Import::createLibraryImport("QtQuick", "1.1"), true)
|
|
||||||
&& !model()->hasImport(Import::createLibraryImport("QtQuick", "2.0"), true)
|
|
||||||
&& !model()->hasImport(Import::createLibraryImport("QtQuick", "2.1"), true)))
|
|
||||||
model()->changeImports(QList<Import>() << Import::createLibraryImport("QtQuick", "1.0"), QList<Import>());
|
model()->changeImports(QList<Import>() << Import::createLibraryImport("QtQuick", "1.0"), QList<Import>());
|
||||||
ModelNode newState = rootStateGroup().addState(newStateName);
|
ModelNode newState = rootStateGroup().addState(newStateName);
|
||||||
setCurrentState(newState);
|
setCurrentState(newState);
|
||||||
|
|||||||
@@ -46,7 +46,7 @@ namespace Internal {
|
|||||||
class QmlProfilerAction : public AnalyzerAction
|
class QmlProfilerAction : public AnalyzerAction
|
||||||
{
|
{
|
||||||
public:
|
public:
|
||||||
QmlProfilerAction() {}
|
explicit QmlProfilerAction(QObject *parent = 0) : AnalyzerAction(parent) { }
|
||||||
};
|
};
|
||||||
|
|
||||||
bool QmlProfilerPlugin::debugOutput = false;
|
bool QmlProfilerPlugin::debugOutput = false;
|
||||||
@@ -65,7 +65,7 @@ bool QmlProfilerPlugin::initialize(const QStringList &arguments, QString *errorS
|
|||||||
"The QML Profiler can be used to find performance bottlenecks in "
|
"The QML Profiler can be used to find performance bottlenecks in "
|
||||||
"applications using QML.");
|
"applications using QML.");
|
||||||
|
|
||||||
action = new QmlProfilerAction;
|
action = new QmlProfilerAction(this);
|
||||||
action->setId("QmlProfiler.Local");
|
action->setId("QmlProfiler.Local");
|
||||||
action->setTool(tool);
|
action->setTool(tool);
|
||||||
action->setText(tr("QML Profiler"));
|
action->setText(tr("QML Profiler"));
|
||||||
@@ -74,7 +74,7 @@ bool QmlProfilerPlugin::initialize(const QStringList &arguments, QString *errorS
|
|||||||
action->setMenuGroup(Constants::G_ANALYZER_TOOLS);
|
action->setMenuGroup(Constants::G_ANALYZER_TOOLS);
|
||||||
AnalyzerManager::addAction(action);
|
AnalyzerManager::addAction(action);
|
||||||
|
|
||||||
action = new QmlProfilerAction;
|
action = new QmlProfilerAction(this);
|
||||||
action->setId("QmlProfiler.Remote");
|
action->setId("QmlProfiler.Remote");
|
||||||
action->setTool(tool);
|
action->setTool(tool);
|
||||||
action->setText(tr("QML Profiler (External)"));
|
action->setText(tr("QML Profiler (External)"));
|
||||||
|
|||||||
@@ -58,8 +58,6 @@ public:
|
|||||||
|
|
||||||
private:
|
private:
|
||||||
QList<AbstractTimelineModel*> timelineModels;
|
QList<AbstractTimelineModel*> timelineModels;
|
||||||
|
|
||||||
|
|
||||||
};
|
};
|
||||||
|
|
||||||
} // namespace Internal
|
} // namespace Internal
|
||||||
|
|||||||
@@ -51,7 +51,14 @@ QString QmlProjectEnvironmentAspect::baseEnvironmentDisplayName(int base) const
|
|||||||
|
|
||||||
Utils::Environment QmlProjectManager::QmlProjectEnvironmentAspect::baseEnvironment() const
|
Utils::Environment QmlProjectManager::QmlProjectEnvironmentAspect::baseEnvironment() const
|
||||||
{
|
{
|
||||||
|
#if 1
|
||||||
|
// workaround for QTBUG-35143
|
||||||
|
Utils::Environment env = Utils::Environment::systemEnvironment();
|
||||||
|
env.unset(QLatin1String("QSG_RENDER_LOOP"));
|
||||||
|
return env;
|
||||||
|
#else
|
||||||
return Utils::Environment::systemEnvironment();
|
return Utils::Environment::systemEnvironment();
|
||||||
|
#endif
|
||||||
}
|
}
|
||||||
|
|
||||||
QmlProjectEnvironmentAspect::QmlProjectEnvironmentAspect(ProjectExplorer::RunConfiguration *rc) :
|
QmlProjectEnvironmentAspect::QmlProjectEnvironmentAspect(ProjectExplorer::RunConfiguration *rc) :
|
||||||
|
|||||||
@@ -104,6 +104,18 @@ void TodoOutputTreeView::resizeEvent(QResizeEvent *event)
|
|||||||
setColumnWidth(Constants::OUTPUT_COLUMN_FILE, widthFile);
|
setColumnWidth(Constants::OUTPUT_COLUMN_FILE, widthFile);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
void TodoOutputTreeView::keyPressEvent(QKeyEvent *e)
|
||||||
|
{
|
||||||
|
if (!e->modifiers()
|
||||||
|
&& (e->key() == Qt::Key_Return || e->key() == Qt::Key_Enter)
|
||||||
|
&& currentIndex().isValid()) {
|
||||||
|
emit clicked(currentIndex());
|
||||||
|
e->accept();
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
QTreeView::keyPressEvent(e);
|
||||||
|
}
|
||||||
|
|
||||||
void TodoOutputTreeView::todoColumnResized(int column, int oldSize, int newSize)
|
void TodoOutputTreeView::todoColumnResized(int column, int oldSize, int newSize)
|
||||||
{
|
{
|
||||||
Q_UNUSED(oldSize);
|
Q_UNUSED(oldSize);
|
||||||
|
|||||||
@@ -43,6 +43,7 @@ public:
|
|||||||
~TodoOutputTreeView();
|
~TodoOutputTreeView();
|
||||||
|
|
||||||
void resizeEvent(QResizeEvent *event);
|
void resizeEvent(QResizeEvent *event);
|
||||||
|
void keyPressEvent(QKeyEvent *e);
|
||||||
|
|
||||||
private slots:
|
private slots:
|
||||||
void todoColumnResized(int column, int oldSize, int newSize);
|
void todoColumnResized(int column, int oldSize, int newSize);
|
||||||
|
|||||||
@@ -85,7 +85,7 @@ public:
|
|||||||
class ValgrindAction : public AnalyzerAction
|
class ValgrindAction : public AnalyzerAction
|
||||||
{
|
{
|
||||||
public:
|
public:
|
||||||
ValgrindAction() {}
|
explicit ValgrindAction(QObject *parent = 0) : AnalyzerAction(parent) { }
|
||||||
};
|
};
|
||||||
|
|
||||||
|
|
||||||
@@ -114,7 +114,7 @@ bool ValgrindPlugin::initialize(const QStringList &, QString *)
|
|||||||
"\"memcheck\" tool to find memory leaks.");
|
"\"memcheck\" tool to find memory leaks.");
|
||||||
|
|
||||||
if (!Utils::HostOsInfo::isWindowsHost()) {
|
if (!Utils::HostOsInfo::isWindowsHost()) {
|
||||||
action = new ValgrindAction;
|
action = new ValgrindAction(this);
|
||||||
action->setId("Memcheck.Local");
|
action->setId("Memcheck.Local");
|
||||||
action->setTool(m_memcheckTool);
|
action->setTool(m_memcheckTool);
|
||||||
action->setText(tr("Valgrind Memory Analyzer"));
|
action->setText(tr("Valgrind Memory Analyzer"));
|
||||||
@@ -124,7 +124,7 @@ bool ValgrindPlugin::initialize(const QStringList &, QString *)
|
|||||||
action->setEnabled(false);
|
action->setEnabled(false);
|
||||||
AnalyzerManager::addAction(action);
|
AnalyzerManager::addAction(action);
|
||||||
|
|
||||||
action = new ValgrindAction;
|
action = new ValgrindAction(this);
|
||||||
action->setId("Callgrind.Local");
|
action->setId("Callgrind.Local");
|
||||||
action->setTool(m_callgrindTool);
|
action->setTool(m_callgrindTool);
|
||||||
action->setText(tr("Valgrind Function Profiler"));
|
action->setText(tr("Valgrind Function Profiler"));
|
||||||
@@ -135,7 +135,7 @@ bool ValgrindPlugin::initialize(const QStringList &, QString *)
|
|||||||
AnalyzerManager::addAction(action);
|
AnalyzerManager::addAction(action);
|
||||||
}
|
}
|
||||||
|
|
||||||
action = new ValgrindAction;
|
action = new ValgrindAction(this);
|
||||||
action->setId("Memcheck.Remote");
|
action->setId("Memcheck.Remote");
|
||||||
action->setTool(m_memcheckTool);
|
action->setTool(m_memcheckTool);
|
||||||
action->setText(tr("Valgrind Memory Analyzer (Remote)"));
|
action->setText(tr("Valgrind Memory Analyzer (Remote)"));
|
||||||
@@ -144,7 +144,7 @@ bool ValgrindPlugin::initialize(const QStringList &, QString *)
|
|||||||
action->setStartMode(StartRemote);
|
action->setStartMode(StartRemote);
|
||||||
AnalyzerManager::addAction(action);
|
AnalyzerManager::addAction(action);
|
||||||
|
|
||||||
action = new ValgrindAction;
|
action = new ValgrindAction(this);
|
||||||
action->setId("Callgrind.Remote");
|
action->setId("Callgrind.Remote");
|
||||||
action->setTool(m_callgrindTool);
|
action->setTool(m_callgrindTool);
|
||||||
action->setText(tr("Valgrind Function Profiler (Remote)"));
|
action->setText(tr("Valgrind Function Profiler (Remote)"));
|
||||||
|
|||||||
@@ -1091,6 +1091,7 @@ void AppOpSession::deviceCallbackReturned()
|
|||||||
bool AppOpSession::runApp()
|
bool AppOpSession::runApp()
|
||||||
{
|
{
|
||||||
bool failure = (device == 0);
|
bool failure = (device == 0);
|
||||||
|
QString exe = appPathOnDevice();
|
||||||
ServiceSocket gdbFd = -1;
|
ServiceSocket gdbFd = -1;
|
||||||
if (!failure && !startService(QLatin1String("com.apple.debugserver"), gdbFd))
|
if (!failure && !startService(QLatin1String("com.apple.debugserver"), gdbFd))
|
||||||
gdbFd = -1;
|
gdbFd = -1;
|
||||||
@@ -1103,7 +1104,6 @@ bool AppOpSession::runApp()
|
|||||||
if (!failure) failure = !sendGdbCommand(gdbFd, "QEnvironmentHexEncoded:"); // send the environment with a series of these commands...
|
if (!failure) failure = !sendGdbCommand(gdbFd, "QEnvironmentHexEncoded:"); // send the environment with a series of these commands...
|
||||||
if (!failure) failure = !sendGdbCommand(gdbFd, "QSetDisableASLR:1"); // avoid address randomization to debug
|
if (!failure) failure = !sendGdbCommand(gdbFd, "QSetDisableASLR:1"); // avoid address randomization to debug
|
||||||
if (!failure) failure = !expectGdbOkReply(gdbFd);
|
if (!failure) failure = !expectGdbOkReply(gdbFd);
|
||||||
QString exe = appPathOnDevice();
|
|
||||||
QStringList args = extraArgs;
|
QStringList args = extraArgs;
|
||||||
QByteArray runCommand("A");
|
QByteArray runCommand("A");
|
||||||
args.insert(0, exe);
|
args.insert(0, exe);
|
||||||
|
|||||||
@@ -334,7 +334,6 @@ private slots:
|
|||||||
void unfinished_function_like_macro_call();
|
void unfinished_function_like_macro_call();
|
||||||
void nasty_macro_expansion();
|
void nasty_macro_expansion();
|
||||||
void glib_attribute();
|
void glib_attribute();
|
||||||
void builtin__FILE__();
|
|
||||||
void blockSkipping();
|
void blockSkipping();
|
||||||
void includes_1();
|
void includes_1();
|
||||||
void dont_eagerly_expand();
|
void dont_eagerly_expand();
|
||||||
@@ -784,23 +783,6 @@ void tst_Preprocessor::glib_attribute()
|
|||||||
QCOMPARE(preprocessed, result____);
|
QCOMPARE(preprocessed, result____);
|
||||||
}
|
}
|
||||||
|
|
||||||
void tst_Preprocessor::builtin__FILE__()
|
|
||||||
{
|
|
||||||
Client *client = 0; // no client.
|
|
||||||
Environment env;
|
|
||||||
|
|
||||||
Preprocessor preprocess(client, &env);
|
|
||||||
QByteArray preprocessed = preprocess.run(
|
|
||||||
QLatin1String("some-file.c"),
|
|
||||||
QByteArray("const char *f = __FILE__\n"
|
|
||||||
));
|
|
||||||
const QByteArray result____ =
|
|
||||||
"# 1 \"some-file.c\"\n"
|
|
||||||
"const char *f = \"some-file.c\"\n";
|
|
||||||
|
|
||||||
QCOMPARE(preprocessed, result____);
|
|
||||||
}
|
|
||||||
|
|
||||||
void tst_Preprocessor::comparisons_data()
|
void tst_Preprocessor::comparisons_data()
|
||||||
{
|
{
|
||||||
QTest::addColumn<QString>("infile");
|
QTest::addColumn<QString>("infile");
|
||||||
|
|||||||
@@ -302,9 +302,9 @@ struct UnsubstitutedValue : Value
|
|||||||
|
|
||||||
struct Type
|
struct Type
|
||||||
{
|
{
|
||||||
Type() : qtVersion(0) {}
|
Type() : qtVersion(0), isPattern(false) {}
|
||||||
Type(const char *str) : type(str), qtVersion(0) {}
|
Type(const char *str) : type(str), qtVersion(0), isPattern(false) {}
|
||||||
Type(const QByteArray &ba) : type(ba), qtVersion(0) {}
|
Type(const QByteArray &ba) : type(ba), qtVersion(0), isPattern(false) {}
|
||||||
|
|
||||||
bool matches(const QByteArray &actualType0, const Context &context) const
|
bool matches(const QByteArray &actualType0, const Context &context) const
|
||||||
{
|
{
|
||||||
@@ -329,10 +329,16 @@ struct Type
|
|||||||
expectedType.replace(' ', "");
|
expectedType.replace(' ', "");
|
||||||
expectedType.replace("const", "");
|
expectedType.replace("const", "");
|
||||||
expectedType.replace('@', context.nameSpace);
|
expectedType.replace('@', context.nameSpace);
|
||||||
|
if (isPattern) {
|
||||||
|
QString actual = QString::fromLatin1(actualType);
|
||||||
|
QString expected = QString::fromLatin1(expectedType);
|
||||||
|
return QRegExp(expected).exactMatch(actual);
|
||||||
|
}
|
||||||
return actualType == expectedType;
|
return actualType == expectedType;
|
||||||
}
|
}
|
||||||
QByteArray type;
|
QByteArray type;
|
||||||
int qtVersion;
|
int qtVersion;
|
||||||
|
bool isPattern;
|
||||||
};
|
};
|
||||||
|
|
||||||
struct Type4 : Type
|
struct Type4 : Type
|
||||||
@@ -345,6 +351,11 @@ struct Type5 : Type
|
|||||||
Type5(const QByteArray &ba) : Type(ba) { qtVersion = 5; }
|
Type5(const QByteArray &ba) : Type(ba) { qtVersion = 5; }
|
||||||
};
|
};
|
||||||
|
|
||||||
|
struct Pattern : Type
|
||||||
|
{
|
||||||
|
Pattern(const QByteArray &ba) : Type(ba) { isPattern = true; }
|
||||||
|
};
|
||||||
|
|
||||||
enum DebuggerEngine
|
enum DebuggerEngine
|
||||||
{
|
{
|
||||||
DumpTestGdbEngine = 0x01,
|
DumpTestGdbEngine = 0x01,
|
||||||
@@ -2564,8 +2575,7 @@ void tst_Dumpers::dumper_data()
|
|||||||
% Check("atts.attList.2.localname", "\"localPart3\"", "@QString")
|
% Check("atts.attList.2.localname", "\"localPart3\"", "@QString")
|
||||||
% Check("atts.attList.2.qname", "\"name3\"", "@QString")
|
% Check("atts.attList.2.qname", "\"name3\"", "@QString")
|
||||||
% Check("atts.attList.2.uri", "\"uri3\"", "@QString")
|
% Check("atts.attList.2.uri", "\"uri3\"", "@QString")
|
||||||
% Check("atts.attList.2.value", "\"value3\"", "@QString")
|
% Check("atts.attList.2.value", "\"value3\"", "@QString");
|
||||||
% Check("atts.d", "", "@QXmlAttributesPrivate");
|
|
||||||
|
|
||||||
QTest::newRow("StdArray")
|
QTest::newRow("StdArray")
|
||||||
<< Data("#include <array>\n"
|
<< Data("#include <array>\n"
|
||||||
@@ -2576,8 +2586,8 @@ void tst_Dumpers::dumper_data()
|
|||||||
% CoreProfile()
|
% CoreProfile()
|
||||||
% Cxx11Profile()
|
% Cxx11Profile()
|
||||||
% MacLibCppProfile()
|
% MacLibCppProfile()
|
||||||
% Check("a", "<4 items>", "std::array<int, 4u>")
|
% Check("a", "<4 items>", Pattern("std::array<int, 4u.*>"))
|
||||||
% Check("b", "<4 items>", "std::array<@QString, 4u>");
|
% Check("b", "<4 items>", Pattern("std::array<@QString, 4u.*>"));
|
||||||
|
|
||||||
QTest::newRow("StdComplex")
|
QTest::newRow("StdComplex")
|
||||||
<< Data("#include <complex>\n",
|
<< Data("#include <complex>\n",
|
||||||
|
|||||||
@@ -34,8 +34,8 @@
|
|||||||
:Behavior.Autocomplete common prefix_QCheckBox {container=':CppTools__Internal__CompletionSettingsPage.Behavior_QGroupBox' name='partiallyComplete' text='Autocomplete common prefix' type='QCheckBox' visible='1'}
|
:Behavior.Autocomplete common prefix_QCheckBox {container=':CppTools__Internal__CompletionSettingsPage.Behavior_QGroupBox' name='partiallyComplete' text='Autocomplete common prefix' type='QCheckBox' visible='1'}
|
||||||
:Behavior.completionTrigger_QComboBox {container=':CppTools__Internal__CompletionSettingsPage.Behavior_QGroupBox' name='completionTrigger' type='QComboBox' visible='1'}
|
:Behavior.completionTrigger_QComboBox {container=':CppTools__Internal__CompletionSettingsPage.Behavior_QGroupBox' name='completionTrigger' type='QComboBox' visible='1'}
|
||||||
:Breakpoints_Debugger::Internal::BreakTreeView {container=':DebugModeWidget.Breakpoints_QDockWidget' type='Debugger::Internal::BreakTreeView' unnamed='1' visible='1'}
|
:Breakpoints_Debugger::Internal::BreakTreeView {container=':DebugModeWidget.Breakpoints_QDockWidget' type='Debugger::Internal::BreakTreeView' unnamed='1' visible='1'}
|
||||||
:CMake Wizard.Cancel_QPushButton {text='Cancel' type='QPushButton' unnamed='1' visible='1' window=':CMake Wizard_CMakeProjectManager::Internal::CMakeOpenProjectWizard'}
|
:CMake Wizard.Cancel_QPushButton {text='Cancel' type='QPushButton' visible='1' window=':CMake Wizard_CMakeProjectManager::Internal::CMakeOpenProjectWizard'}
|
||||||
:CMake Wizard.Finish_QPushButton {text~='(Finish|Done)' type='QPushButton' unnamed='1' visible='1' window=':CMake Wizard_CMakeProjectManager::Internal::CMakeOpenProjectWizard'}
|
:CMake Wizard.Finish_QPushButton {text~='(Finish|Done)' type='QPushButton' visible='1' window=':CMake Wizard_CMakeProjectManager::Internal::CMakeOpenProjectWizard'}
|
||||||
:CMake Wizard.Generator:_QLabel {text='Generator:' type='QLabel' unnamed='1' visible='1' window=':CMake Wizard_CMakeProjectManager::Internal::CMakeOpenProjectWizard'}
|
:CMake Wizard.Generator:_QLabel {text='Generator:' type='QLabel' unnamed='1' visible='1' window=':CMake Wizard_CMakeProjectManager::Internal::CMakeOpenProjectWizard'}
|
||||||
:CMake Wizard.Next_QPushButton {name='__qt__passive_wizardbutton1' text~='(Next.*|Continue)' type='QPushButton' visible='1' window=':CMake Wizard_CMakeProjectManager::Internal::CMakeOpenProjectWizard'}
|
:CMake Wizard.Next_QPushButton {name='__qt__passive_wizardbutton1' text~='(Next.*|Continue)' type='QPushButton' visible='1' window=':CMake Wizard_CMakeProjectManager::Internal::CMakeOpenProjectWizard'}
|
||||||
:CMake Wizard.Run CMake_QPushButton {text='Run CMake' type='QPushButton' unnamed='1' visible='1' window=':CMake Wizard_CMakeProjectManager::Internal::CMakeOpenProjectWizard'}
|
:CMake Wizard.Run CMake_QPushButton {text='Run CMake' type='QPushButton' unnamed='1' visible='1' window=':CMake Wizard_CMakeProjectManager::Internal::CMakeOpenProjectWizard'}
|
||||||
@@ -82,8 +82,8 @@
|
|||||||
:FormEditorStack_qdesigner_internal::FormWindow {container=':*Qt Creator.FormEditorStack_Designer::Internal::FormEditorStack' type='qdesigner_internal::FormWindow' unnamed='1' visible='1'}
|
:FormEditorStack_qdesigner_internal::FormWindow {container=':*Qt Creator.FormEditorStack_Designer::Internal::FormEditorStack' type='qdesigner_internal::FormWindow' unnamed='1' visible='1'}
|
||||||
:FormEditorStack_qdesigner_internal::PropertyLineEdit {container=':*Qt Creator.FormEditorStack_Designer::Internal::FormEditorStack' type='qdesigner_internal::PropertyLineEdit' unnamed='1' visible='1'}
|
:FormEditorStack_qdesigner_internal::PropertyLineEdit {container=':*Qt Creator.FormEditorStack_Designer::Internal::FormEditorStack' type='qdesigner_internal::PropertyLineEdit' unnamed='1' visible='1'}
|
||||||
:Generator:_QComboBox {buddy=':CMake Wizard.Generator:_QLabel' type='QComboBox' unnamed='1' visible='1'}
|
:Generator:_QComboBox {buddy=':CMake Wizard.Generator:_QLabel' type='QComboBox' unnamed='1' visible='1'}
|
||||||
:Git Repository Clone.Cancel_QPushButton {text='Cancel' type='QPushButton' unnamed='1' visible='1' window=':Git Repository Clone_VcsBase::Internal::CheckoutWizardDialog'}
|
:Git Repository Clone.Cancel_QPushButton {text='Cancel' type='QPushButton' visible='1' window=':Git Repository Clone_VcsBase::Internal::CheckoutWizardDialog'}
|
||||||
:Git Repository Clone.Finish_QPushButton {text~='(Finish|Done)' type='QPushButton' unnamed='1' visible='1' window=':Git Repository Clone_VcsBase::Internal::CheckoutWizardDialog'}
|
:Git Repository Clone.Finish_QPushButton {text~='(Finish|Done)' type='QPushButton' visible='1' window=':Git Repository Clone_VcsBase::Internal::CheckoutWizardDialog'}
|
||||||
:Git Repository Clone.Repository_QGroupBox {name='repositoryGroupBox' title='Repository' type='QGroupBox' visible='1' window=':Git Repository Clone_VcsBase::Internal::CheckoutWizardDialog'}
|
:Git Repository Clone.Repository_QGroupBox {name='repositoryGroupBox' title='Repository' type='QGroupBox' visible='1' window=':Git Repository Clone_VcsBase::Internal::CheckoutWizardDialog'}
|
||||||
:Git Repository Clone.Result._QLabel {name='statusLabel' type='QLabel' visible='1' window=':Git Repository Clone_VcsBase::Internal::CheckoutWizardDialog'}
|
:Git Repository Clone.Result._QLabel {name='statusLabel' type='QLabel' visible='1' window=':Git Repository Clone_VcsBase::Internal::CheckoutWizardDialog'}
|
||||||
:Git Repository Clone.Working Copy_QGroupBox {name='localGroupBox' title='Working Copy' type='QGroupBox' visible='1' window=':Git Repository Clone_VcsBase::Internal::CheckoutWizardDialog'}
|
:Git Repository Clone.Working Copy_QGroupBox {name='localGroupBox' title='Working Copy' type='QGroupBox' visible='1' window=':Git Repository Clone_VcsBase::Internal::CheckoutWizardDialog'}
|
||||||
|
|||||||
@@ -92,9 +92,10 @@ def main():
|
|||||||
if not waitFor("'dummy.cpp ' in str(mainWin.windowTitle) and ' - cplusplus-tools - ' in str(mainWin.windowTitle)", 5000):
|
if not waitFor("'dummy.cpp ' in str(mainWin.windowTitle) and ' - cplusplus-tools - ' in str(mainWin.windowTitle)", 5000):
|
||||||
test.warning("Opening dummy.cpp seems to have failed")
|
test.warning("Opening dummy.cpp seems to have failed")
|
||||||
# Reset cursor to the start of the document
|
# Reset cursor to the start of the document
|
||||||
cursor = findObject(":Qt Creator_CppEditor::Internal::CPPEditorWidget").textCursor()
|
if platform.system() == 'Darwin':
|
||||||
cursor.movePosition(QTextCursor.Start)
|
type(cppwindow, "<Home>")
|
||||||
cppwindow.setTextCursor(cursor)
|
else:
|
||||||
|
type(cppwindow, "<Ctrl+Home>")
|
||||||
|
|
||||||
type(cppwindow, "<Ctrl+F>")
|
type(cppwindow, "<Ctrl+F>")
|
||||||
clickButton(waitForObject(":*Qt Creator_Utils::IconButton"))
|
clickButton(waitForObject(":*Qt Creator_Utils::IconButton"))
|
||||||
|
|||||||
Reference in New Issue
Block a user