Merge remote-tracking branch 'origin/4.10'
Conflicts: src/plugins/baremetal/iarewtoolchain.cpp Change-Id: I483e81d7e920e724fb7cde84a8f6fa9bce4cd518
Before Width: | Height: | Size: 13 KiB After Width: | Height: | Size: 11 KiB |
Before Width: | Height: | Size: 11 KiB After Width: | Height: | Size: 9.8 KiB |
Before Width: | Height: | Size: 5.2 KiB After Width: | Height: | Size: 2.3 KiB |
Before Width: | Height: | Size: 34 KiB After Width: | Height: | Size: 11 KiB |
Before Width: | Height: | Size: 4.4 KiB After Width: | Height: | Size: 3.0 KiB |
Before Width: | Height: | Size: 6.1 KiB After Width: | Height: | Size: 5.5 KiB |
Before Width: | Height: | Size: 24 KiB After Width: | Height: | Size: 7.8 KiB |
Before Width: | Height: | Size: 43 KiB After Width: | Height: | Size: 15 KiB |
Before Width: | Height: | Size: 24 KiB After Width: | Height: | Size: 8.9 KiB |
Before Width: | Height: | Size: 8.8 KiB After Width: | Height: | Size: 6.2 KiB |
Before Width: | Height: | Size: 59 KiB After Width: | Height: | Size: 41 KiB |
Before Width: | Height: | Size: 15 KiB After Width: | Height: | Size: 6.1 KiB |
Before Width: | Height: | Size: 22 KiB After Width: | Height: | Size: 9.6 KiB |
Before Width: | Height: | Size: 10 KiB After Width: | Height: | Size: 34 KiB |
Before Width: | Height: | Size: 45 KiB After Width: | Height: | Size: 25 KiB |
Before Width: | Height: | Size: 22 KiB After Width: | Height: | Size: 40 KiB |
Before Width: | Height: | Size: 8.5 KiB After Width: | Height: | Size: 17 KiB |
Before Width: | Height: | Size: 5.0 KiB After Width: | Height: | Size: 3.6 KiB |
Before Width: | Height: | Size: 50 KiB After Width: | Height: | Size: 12 KiB |
Before Width: | Height: | Size: 2.7 KiB After Width: | Height: | Size: 3.7 KiB |
Before Width: | Height: | Size: 54 KiB After Width: | Height: | Size: 260 KiB |
Before Width: | Height: | Size: 14 KiB After Width: | Height: | Size: 33 KiB |
Before Width: | Height: | Size: 6.5 KiB After Width: | Height: | Size: 7.4 KiB |
Before Width: | Height: | Size: 22 KiB After Width: | Height: | Size: 31 KiB |
Before Width: | Height: | Size: 29 KiB After Width: | Height: | Size: 56 KiB |
Before Width: | Height: | Size: 29 KiB After Width: | Height: | Size: 125 KiB |
@@ -282,7 +282,14 @@
|
||||
Note that functions used in the expressions are called each time, even if
|
||||
they have side-effects.
|
||||
|
||||
All backends support simple C and C++ expressions. Functions can be called
|
||||
The QML debugger can evaluate JavaScript expressions.
|
||||
|
||||
//! [debugger-expressions]
|
||||
|
||||
//! [debugger-expressions-cpp]
|
||||
|
||||
GDB, LLDB and CDB support the evaluation of simple C and C++ expressions.
|
||||
Functions can be called
|
||||
only if they are actually compiled into the debugged executable or a library
|
||||
used by the executable. Most notably, inlined functions such as most
|
||||
\c{operator[]} implementations of standard containers are typically \e{not}
|
||||
@@ -318,6 +325,14 @@
|
||||
however, can be recognized as such.
|
||||
\endtable
|
||||
|
||||
\note The set of evaluated expressions is saved in your session.
|
||||
|
||||
//! [debugger-expressions-cpp]
|
||||
|
||||
//! [debugger-qt-basic-objects]
|
||||
|
||||
\section1 Inspecting Basic Qt Objects
|
||||
|
||||
The \uicontrol {Locals} and \uicontrol {Expressions} views also provide access
|
||||
to the most powerful feature of the debugger: comprehensive display of data
|
||||
belonging to Qt's basic objects. For example, in case of QObject, instead of
|
||||
@@ -327,7 +342,7 @@
|
||||
Similarly, instead of displaying many pointers and integers, \QC's debugger
|
||||
displays the contents of a QHash or QMap in an orderly manner. Also, the
|
||||
debugger displays access data for QFileInfo and provides access to the
|
||||
"real" contents of QVariant.
|
||||
\e real contents of QVariant.
|
||||
|
||||
Right-click in the \uicontrol {Locals} or the \uicontrol {Expressions} view
|
||||
to open a context menu that provides additional options for viewing data. The
|
||||
@@ -354,8 +369,5 @@
|
||||
You can enable tooltips in the main editor displaying this information.
|
||||
For more information, see \l{Showing Tooltips in Debug Mode}.
|
||||
|
||||
\note The set of evaluated expressions is saved in your session.
|
||||
|
||||
//! [debugger-expressions]
|
||||
|
||||
//! [debugger-qt-basic-objects]
|
||||
*/
|
||||
|
@@ -588,6 +588,8 @@
|
||||
\include creator-debugger-common.qdocinc debugger-call-stack-trace
|
||||
\include creator-debugger-common.qdocinc debugger-locals
|
||||
\include creator-debugger-common.qdocinc debugger-expressions
|
||||
\include creator-debugger-common.qdocinc debugger-expressions-cpp
|
||||
\include creator-debugger-common.qdocinc debugger-qt-basic-objects
|
||||
|
||||
\section1 Directly Interacting with Native Debuggers
|
||||
|
||||
|
@@ -87,7 +87,7 @@
|
||||
|
||||
\image qtquick-example-stack.png
|
||||
|
||||
\li Examine the local variables in the \uicontrol {Locals and Expressions}
|
||||
\li Examine the local variables in the \uicontrol Locals
|
||||
view. Step through the code to see how the information changes in
|
||||
the view.
|
||||
|
||||
@@ -105,8 +105,8 @@
|
||||
\li To remove a breakpoint, right-click it and select
|
||||
\uicontrol {Delete Breakpoint}.
|
||||
|
||||
\li Select the \uicontrol {Locals and Expressions} tab to explore the object
|
||||
structure at runtime:
|
||||
\li In the \uicontrol Locals view, explore the object structure at
|
||||
runtime.
|
||||
|
||||
\image qtquick-example-qml-inspector.png
|
||||
|
||||
@@ -115,11 +115,11 @@
|
||||
|
||||
\li Select \uicontrol Debug > \uicontrol Select to activate selection
|
||||
mode and then click the \uicontrol Menu button to move into the
|
||||
\uicontrol menuButton component in the
|
||||
\uicontrol {Locals and Expressions} view and the code editor.
|
||||
\uicontrol menuButton component in the \uicontrol Locals view and
|
||||
the code editor.
|
||||
|
||||
\li In the \uicontrol {Locals and Expressions} view, double-click the
|
||||
value of a property to change it.
|
||||
\li In the \uicontrol Locals view, double-click the value of a property
|
||||
to change it.
|
||||
|
||||
\endlist
|
||||
|
||||
|
@@ -162,7 +162,7 @@
|
||||
\li \l{Local Variables and Function Parameters}
|
||||
{Viewing local variables and function parameters}
|
||||
|
||||
\li \l{Inspecting Items}{Evaluating expressions at runtime}
|
||||
\li \l{Evaluating Expressions}
|
||||
|
||||
\endlist
|
||||
|
||||
@@ -170,20 +170,21 @@
|
||||
\include creator-debugger-common.qdocinc debugger-breakpoints
|
||||
\include creator-debugger-common.qdocinc debugger-call-stack-trace
|
||||
\include creator-debugger-common.qdocinc debugger-locals
|
||||
\include creator-debugger-common.qdocinc debugger-expressions
|
||||
\endif
|
||||
|
||||
\section1 Inspecting Items
|
||||
|
||||
While the application is running, you can use the \uicontrol {Locals}
|
||||
and \uicontrol{Expressions} views to explore the QML item structure.
|
||||
view to explore the QML item structure.
|
||||
|
||||
\image qml-observer-view.png "QML item tree"
|
||||
|
||||
To keep the application visible while you interact with the debugger, select
|
||||
\uicontrol Debug > \uicontrol {Show Application on Top}.
|
||||
|
||||
You can view a QML item in \uicontrol {Locals} and \uicontrol {Expressions}
|
||||
in the following ways:
|
||||
You can view a QML item in the \uicontrol {Locals} view in the following
|
||||
ways:
|
||||
|
||||
\list
|
||||
|
||||
|
@@ -5,6 +5,7 @@ session, too.
|
||||
|
||||
With
|
||||
|
||||
python import sys
|
||||
python sys.path.insert(1, '<path/to/qtcreator>/share/qtcreator/debugger/')
|
||||
python from gdbbridge import *
|
||||
|
||||
|
@@ -191,10 +191,19 @@ def qdump__CPlusPlus__Internal__Value(d, value):
|
||||
d.putValue(value["l"])
|
||||
d.putPlainChildren(value)
|
||||
|
||||
def qdump__Utils__FileName(d, value):
|
||||
d.putStringValue(value)
|
||||
def qdump__Utils__FilePath(d, value):
|
||||
try:
|
||||
if not d.extractPointer(value["m_url"]): # there is no valid URL
|
||||
d.putStringValue(value["m_data"])
|
||||
else:
|
||||
d.putItem(value["m_url"])
|
||||
except:
|
||||
d.putStringValue(value) # support FileName before 4.10 as well
|
||||
d.putPlainChildren(value)
|
||||
|
||||
def qdump__Utils__FileName(d, value):
|
||||
qdump__Utils__FilePath(d, value)
|
||||
|
||||
def qdump__Utils__ElfSection(d, value):
|
||||
d.putByteArrayValue(value["name"])
|
||||
d.putPlainChildren(value)
|
||||
|
@@ -1230,12 +1230,28 @@ class DumperBase:
|
||||
ns = self.qtNamespace()
|
||||
if len(ns) > 0 and typeName.startswith(ns):
|
||||
typeName = typeName[len(ns):]
|
||||
pos = typeName.find('<')
|
||||
# FIXME: make it recognize foo<A>::bar<B>::iterator?
|
||||
while pos != -1:
|
||||
pos1 = typeName.rfind('>', pos)
|
||||
typeName = typeName[0:pos] + typeName[pos1+1:]
|
||||
pos = typeName.find('<')
|
||||
# warn( 'stripping %s' % typeName )
|
||||
lvl = 0
|
||||
pos = None
|
||||
stripChunks = []
|
||||
sz = len(typeName)
|
||||
for index in range(0, sz):
|
||||
s = typeName[index]
|
||||
if s == '<':
|
||||
lvl += 1
|
||||
if lvl == 1:
|
||||
pos = index
|
||||
continue
|
||||
elif s == '>':
|
||||
lvl -= 1
|
||||
if lvl < 0 :
|
||||
error("Unbalanced '<' in type, @index %d" % index)
|
||||
if lvl == 0:
|
||||
stripChunks.append((pos, index+1))
|
||||
if lvl != 0:
|
||||
error("unbalanced at end of type name")
|
||||
for (f, l) in reversed(stripChunks):
|
||||
typeName = typeName[:f] + typeName[l:]
|
||||
return typeName
|
||||
|
||||
def tryPutPrettyItem(self, typeName, value):
|
||||
|
@@ -34,6 +34,7 @@ import string
|
||||
import inspect
|
||||
import traceback
|
||||
import fnmatch
|
||||
import platform
|
||||
|
||||
|
||||
class QuitException(Exception):
|
||||
@@ -278,6 +279,8 @@ class QtcInternalDumper:
|
||||
if not canonic:
|
||||
canonic = os.path.abspath(filename)
|
||||
canonic = os.path.normcase(canonic)
|
||||
if platform.system() in ('Microsoft', 'Windows'):
|
||||
canonic = canonic.replace('\\', '/')
|
||||
self.fncache[filename] = canonic
|
||||
return canonic
|
||||
|
||||
|
@@ -1207,7 +1207,7 @@ def qdump__QObjectPrivate__ConnectionList(d, value):
|
||||
with Children(d):
|
||||
first, last = value.split('pp')
|
||||
currentConnection = first
|
||||
connectionType = d.createType('QObjectPrivate::Connection')
|
||||
connectionType = d.createType('@QObjectPrivate::Connection')
|
||||
while currentConnection and currentConnection != last:
|
||||
sender, receiver, slotObj, nextConnectionList, nextp, prev = \
|
||||
d.split('pppppp', currentConnection)
|
||||
|
@@ -0,0 +1,31 @@
|
||||
/****************************************************************************
|
||||
**
|
||||
** Copyright (C) 2016 The Qt Company Ltd.
|
||||
** Contact: https://www.qt.io/licensing/
|
||||
**
|
||||
** This file is part of Qt Creator.
|
||||
**
|
||||
** Commercial License Usage
|
||||
** Licensees holding valid commercial Qt licenses may use this file in
|
||||
** accordance with the commercial license agreement provided with the
|
||||
** Software or, alternatively, in accordance with the terms contained in
|
||||
** a written agreement between you and The Qt Company. For licensing terms
|
||||
** and conditions see https://www.qt.io/terms-conditions. For further
|
||||
** information use the contact form at https://www.qt.io/contact-us.
|
||||
**
|
||||
** GNU General Public License Usage
|
||||
** Alternatively, this file may be used under the terms of the GNU
|
||||
** General Public License version 3 as published by the Free Software
|
||||
** Foundation with exceptions as appearing in the file LICENSE.GPL3-EXCEPT
|
||||
** included in the packaging of this file. Please review the following
|
||||
** information to ensure the GNU General Public License requirements will
|
||||
** be met: https://www.gnu.org/licenses/gpl-3.0.html.
|
||||
**
|
||||
****************************************************************************/
|
||||
|
||||
import QtQuick 2.1
|
||||
import StudioControls 1.0 as StudioControls
|
||||
import QtQuick.Controls.Styles 1.1
|
||||
|
||||
StudioControls.ActionIndicator {
|
||||
}
|
@@ -1,3 +1,4 @@
|
||||
ActionIndicator 2.0 ActionIndicator.qml
|
||||
AligmentHorizontalButtons 2.0 AligmentHorizontalButtons.qml
|
||||
AligmentVerticalButtons 2.0 AligmentVerticalButtons.qml
|
||||
AnchorButtons 2.0 AnchorButtons.qml
|
||||
|
@@ -32,14 +32,14 @@ Rectangle {
|
||||
|
||||
property Item myControl
|
||||
|
||||
property bool showBackground: true
|
||||
property alias icon: actionIndicatorIcon
|
||||
|
||||
property bool hover: false
|
||||
property bool pressed: false
|
||||
|
||||
color: StudioTheme.Values.themeControlBackground
|
||||
border.color: StudioTheme.Values.themeControlOutline
|
||||
state: "default"
|
||||
color: actionIndicator.showBackground ? StudioTheme.Values.themeControlBackground : "transparent"
|
||||
border.color: actionIndicator.showBackground ? StudioTheme.Values.themeControlOutline : "transparent"
|
||||
|
||||
implicitWidth: StudioTheme.Values.height
|
||||
implicitHeight: StudioTheme.Values.height
|
||||
@@ -55,6 +55,26 @@ Rectangle {
|
||||
font.pixelSize: StudioTheme.Values.myIconFontSize
|
||||
verticalAlignment: Text.AlignVCenter
|
||||
horizontalAlignment: Text.AlignHCenter
|
||||
|
||||
states: [
|
||||
State {
|
||||
name: "hovered"
|
||||
when: actionIndicator.hover && !actionIndicator.pressed
|
||||
&& !myControl.edit && !myControl.drag && myControl.enabled
|
||||
PropertyChanges {
|
||||
target: actionIndicatorIcon
|
||||
scale: 1.2
|
||||
}
|
||||
},
|
||||
State {
|
||||
name: "disabled"
|
||||
when: !myControl.enabled
|
||||
PropertyChanges {
|
||||
target: actionIndicatorIcon
|
||||
color: StudioTheme.Values.themeTextColorDisabled
|
||||
}
|
||||
}
|
||||
]
|
||||
}
|
||||
|
||||
MouseArea {
|
||||
@@ -70,27 +90,18 @@ Rectangle {
|
||||
name: "default"
|
||||
when: myControl.enabled && !actionIndicator.hover
|
||||
&& !actionIndicator.pressed && !myControl.hover
|
||||
&& !myControl.edit && !myControl.drag
|
||||
&& !myControl.edit && !myControl.drag && actionIndicator.showBackground
|
||||
PropertyChanges {
|
||||
target: actionIndicator
|
||||
color: StudioTheme.Values.themeControlBackground
|
||||
border.color: StudioTheme.Values.themeControlOutline
|
||||
}
|
||||
},
|
||||
State {
|
||||
name: "hovered"
|
||||
when: actionIndicator.hover && !actionIndicator.pressed
|
||||
&& !myControl.edit && !myControl.drag
|
||||
PropertyChanges {
|
||||
target: actionIndicatorIcon
|
||||
scale: 1.2
|
||||
}
|
||||
},
|
||||
State {
|
||||
name: "globalHover"
|
||||
when: myControl.hover && !actionIndicator.hover
|
||||
&& !actionIndicator.pressed && !myControl.edit
|
||||
&& !myControl.drag
|
||||
&& !myControl.drag && actionIndicator.showBackground
|
||||
PropertyChanges {
|
||||
target: actionIndicator
|
||||
color: StudioTheme.Values.themeHoverHighlight
|
||||
@@ -99,7 +110,7 @@ Rectangle {
|
||||
},
|
||||
State {
|
||||
name: "edit"
|
||||
when: myControl.edit
|
||||
when: myControl.edit && actionIndicator.showBackground
|
||||
PropertyChanges {
|
||||
target: actionIndicator
|
||||
color: StudioTheme.Values.themeFocusEdit
|
||||
@@ -108,7 +119,7 @@ Rectangle {
|
||||
},
|
||||
State {
|
||||
name: "drag"
|
||||
when: myControl.drag
|
||||
when: myControl.drag && actionIndicator.showBackground
|
||||
PropertyChanges {
|
||||
target: actionIndicator
|
||||
color: StudioTheme.Values.themeFocusDrag
|
||||
@@ -117,16 +128,12 @@ Rectangle {
|
||||
},
|
||||
State {
|
||||
name: "disabled"
|
||||
when: !myControl.enabled
|
||||
when: !myControl.enabled && actionIndicator.showBackground
|
||||
PropertyChanges {
|
||||
target: actionIndicator
|
||||
color: StudioTheme.Values.themeControlBackgroundDisabled
|
||||
border.color: StudioTheme.Values.themeControlOutlineDisabled
|
||||
}
|
||||
PropertyChanges {
|
||||
target: actionIndicatorIcon
|
||||
color: StudioTheme.Values.themeTextColorDisabled
|
||||
}
|
||||
}
|
||||
]
|
||||
}
|
||||
|
@@ -87,7 +87,8 @@ T.ComboBox {
|
||||
color: StudioTheme.Values.themeControlOutline
|
||||
border.color: StudioTheme.Values.themeControlOutline
|
||||
border.width: StudioTheme.Values.border
|
||||
width: myComboBox.width
|
||||
x: actionIndicator.width - (actionIndicatorVisible ? StudioTheme.Values.border : 0)
|
||||
width: myComboBox.width - actionIndicator.width
|
||||
height: myComboBox.height
|
||||
}
|
||||
|
||||
|
@@ -74,8 +74,8 @@ TextInput {
|
||||
if (myControl.popup.opened) {
|
||||
myControl.popup.close()
|
||||
} else {
|
||||
myControl.popup.open()
|
||||
myControl.forceActiveFocus()
|
||||
myControl.popup.open()
|
||||
}
|
||||
} else {
|
||||
textInput.forceActiveFocus()
|
||||
@@ -106,6 +106,10 @@ TextInput {
|
||||
color: StudioTheme.Values.themeControlBackground
|
||||
border.color: StudioTheme.Values.themeControlOutline
|
||||
}
|
||||
PropertyChanges {
|
||||
target: tapHandler
|
||||
enabled: true
|
||||
}
|
||||
PropertyChanges {
|
||||
target: mouseArea
|
||||
cursorShape: Qt.PointingHandCursor
|
||||
|
@@ -151,7 +151,8 @@ T.SpinBox {
|
||||
color: StudioTheme.Values.themeControlOutline
|
||||
border.color: StudioTheme.Values.themeControlOutline
|
||||
border.width: StudioTheme.Values.border
|
||||
width: mySpinBox.width
|
||||
x: actionIndicator.width - (actionIndicatorVisible ? StudioTheme.Values.border : 0)
|
||||
width: mySpinBox.width - actionIndicator.width
|
||||
height: mySpinBox.height
|
||||
}
|
||||
|
||||
|
@@ -53,7 +53,7 @@ Rectangle {
|
||||
pressAndHoldTimer.stop()
|
||||
}
|
||||
|
||||
// This function is meant to synchronize enabled with realEnable to avoid
|
||||
// This function is meant to synchronize enabled with realEnabled to avoid
|
||||
// the internal logic messing with the actual state.
|
||||
function invalidateEnabled() {
|
||||
spinBoxIndicator.enabled = spinBoxIndicator.realEnabled
|
||||
@@ -191,6 +191,14 @@ Rectangle {
|
||||
target: spinBoxIndicator
|
||||
color: StudioTheme.Values.themeFocusDrag
|
||||
}
|
||||
},
|
||||
State {
|
||||
name: "disabled"
|
||||
when: !myControl.enabled
|
||||
PropertyChanges {
|
||||
target: spinBoxIndicator
|
||||
color: StudioTheme.Values.themeControlBackgroundDisabled
|
||||
}
|
||||
}
|
||||
]
|
||||
}
|
||||
|
@@ -143,7 +143,8 @@ T.SpinBox {
|
||||
color: StudioTheme.Values.themeControlOutline
|
||||
border.color: StudioTheme.Values.themeControlOutline
|
||||
border.width: StudioTheme.Values.border
|
||||
width: mySpinBox.width
|
||||
x: actionIndicator.width - (actionIndicatorVisible ? StudioTheme.Values.border : 0)
|
||||
width: mySpinBox.width - actionIndicator.width
|
||||
height: mySpinBox.height
|
||||
}
|
||||
|
||||
|
@@ -58,9 +58,9 @@ T.TextField {
|
||||
persistentSelection: focus // QTBUG-73807
|
||||
clip: true
|
||||
|
||||
width: StudioTheme.Values.height * 5
|
||||
height: StudioTheme.Values.height
|
||||
implicitHeight: StudioTheme.Values.height
|
||||
width: StudioTheme.Values.height * 5
|
||||
|
||||
leftPadding: StudioTheme.Values.inputHorizontalPadding + actionIndicator.width
|
||||
- (actionIndicatorVisible ? StudioTheme.Values.border : 0)
|
||||
@@ -108,7 +108,9 @@ T.TextField {
|
||||
color: StudioTheme.Values.themeControlBackground
|
||||
border.color: StudioTheme.Values.themeControlOutline
|
||||
border.width: StudioTheme.Values.border
|
||||
anchors.fill: parent
|
||||
x: actionIndicator.width - (actionIndicatorVisible ? StudioTheme.Values.border : 0)
|
||||
width: myTextField.width - actionIndicator.width
|
||||
height: myTextField.height
|
||||
}
|
||||
|
||||
TranslationIndicator {
|
||||
|
@@ -224,7 +224,7 @@ PaletteBrightText=ffff3333
|
||||
PaletteText=text
|
||||
PaletteButtonText=text
|
||||
PaletteButtonTextDisabled=textDisabled
|
||||
PaletteToolTipBase=darkBackground
|
||||
PaletteToolTipBase=shadowBackground
|
||||
PaletteHighlight=selectedBackgroundText
|
||||
PaletteDark=shadowBackground
|
||||
PaletteHighlightedText=textHighlighted
|
||||
|
@@ -31,20 +31,19 @@
|
||||
#include "iplugin.h"
|
||||
|
||||
#include <QCoreApplication>
|
||||
#include <QEventLoop>
|
||||
#include <QDateTime>
|
||||
#include <QDebug>
|
||||
#include <QDir>
|
||||
#include <QEventLoop>
|
||||
#include <QFile>
|
||||
#include <QLibrary>
|
||||
#include <QLibraryInfo>
|
||||
#include <QMetaProperty>
|
||||
#include <QSettings>
|
||||
#include <QTextStream>
|
||||
#include <QTime>
|
||||
#include <QWriteLocker>
|
||||
#include <QDebug>
|
||||
#include <QTimer>
|
||||
#include <QSysInfo>
|
||||
#include <QTextStream>
|
||||
#include <QTimer>
|
||||
#include <QWriteLocker>
|
||||
|
||||
#include <utils/algorithm.h>
|
||||
#include <utils/benchmarker.h>
|
||||
@@ -1175,7 +1174,7 @@ void PluginManagerPrivate::addObject(QObject *obj)
|
||||
if (m_profilingVerbosity && !m_profileTimer.isNull()) {
|
||||
// Report a timestamp when adding an object. Useful for profiling
|
||||
// its initialization time.
|
||||
const int absoluteElapsedMS = m_profileTimer->elapsed();
|
||||
const int absoluteElapsedMS = int(m_profileTimer->elapsed());
|
||||
qDebug(" %-43s %8dms", obj->metaObject()->className(), absoluteElapsedMS);
|
||||
}
|
||||
|
||||
@@ -1518,7 +1517,7 @@ PluginSpec *PluginManagerPrivate::pluginByName(const QString &name) const
|
||||
void PluginManagerPrivate::initProfiling()
|
||||
{
|
||||
if (m_profileTimer.isNull()) {
|
||||
m_profileTimer.reset(new QTime);
|
||||
m_profileTimer.reset(new QElapsedTimer);
|
||||
m_profileTimer->start();
|
||||
m_profileElapsedMS = 0;
|
||||
qDebug("Profiling started");
|
||||
@@ -1530,7 +1529,7 @@ void PluginManagerPrivate::initProfiling()
|
||||
void PluginManagerPrivate::profilingReport(const char *what, const PluginSpec *spec /* = 0 */)
|
||||
{
|
||||
if (!m_profileTimer.isNull()) {
|
||||
const int absoluteElapsedMS = m_profileTimer->elapsed();
|
||||
const int absoluteElapsedMS = int(m_profileTimer->elapsed());
|
||||
const int elapsedMS = absoluteElapsedMS - m_profileElapsedMS;
|
||||
m_profileElapsedMS = absoluteElapsedMS;
|
||||
if (spec)
|
||||
|
@@ -29,11 +29,12 @@
|
||||
|
||||
#include <utils/algorithm.h>
|
||||
|
||||
#include <QElapsedTimer>
|
||||
#include <QObject>
|
||||
#include <QReadWriteLock>
|
||||
#include <QScopedPointer>
|
||||
#include <QSet>
|
||||
#include <QStringList>
|
||||
#include <QObject>
|
||||
#include <QScopedPointer>
|
||||
#include <QReadWriteLock>
|
||||
|
||||
#include <queue>
|
||||
|
||||
@@ -117,7 +118,7 @@ public:
|
||||
QEventLoop *shutdownEventLoop = nullptr; // used for async shutdown
|
||||
|
||||
QStringList arguments;
|
||||
QScopedPointer<QTime> m_profileTimer;
|
||||
QScopedPointer<QElapsedTimer> m_profileTimer;
|
||||
QHash<const PluginSpec *, int> m_profileTotal;
|
||||
int m_profileElapsedMS = 0;
|
||||
unsigned m_profilingVerbosity = 0;
|
||||
|
@@ -470,10 +470,10 @@ bool DiagramSceneModel::exportPdf(const QString &fileName, bool selectedElements
|
||||
QSizeF pageSize = status.m_sceneBoundingRect.size();
|
||||
pageSize += QSizeF(2.0 * border, 2.0 * border);
|
||||
pageSize *= scaleFactor;
|
||||
pageSize *= dotsPerMm;
|
||||
|
||||
QPdfWriter pdfWriter(fileName);
|
||||
pdfWriter.setPageSize(QPdfWriter::Custom);
|
||||
pdfWriter.setPageSizeMM(pageSize * dotsPerMm);
|
||||
pdfWriter.setPageSize(QPageSize(pageSize, QPageSize::Millimeter));
|
||||
|
||||
QPainter pdfPainter;
|
||||
pdfPainter.begin(&pdfWriter);
|
||||
|
@@ -66,6 +66,16 @@ static bool compilerExists(const FilePath &compilerPath)
|
||||
return fi.exists() && fi.isExecutable() && fi.isFile();
|
||||
}
|
||||
|
||||
static QString cppLanguageOption(const FilePath &compiler)
|
||||
{
|
||||
const QString baseName = compiler.toFileInfo().baseName();
|
||||
if (baseName == "iccarm")
|
||||
return QString("--c++");
|
||||
if (baseName == "icc8051" || baseName == "iccavr")
|
||||
return QString("--ec++");
|
||||
return {};
|
||||
}
|
||||
|
||||
static Macros dumpPredefinedMacros(const FilePath &compiler, const Core::Id languageId,
|
||||
const QStringList &env)
|
||||
{
|
||||
@@ -87,7 +97,7 @@ static Macros dumpPredefinedMacros(const FilePath &compiler, const Core::Id lang
|
||||
|
||||
CommandLine cmd(compiler, {fakeIn.fileName()});
|
||||
if (languageId == ProjectExplorer::Constants::CXX_LANGUAGE_ID)
|
||||
cmd.addArg("--c++");
|
||||
cmd.addArg(cppLanguageOption(compiler));
|
||||
cmd.addArg("--predef_macros");
|
||||
cmd.addArg(outpath);
|
||||
|
||||
@@ -132,7 +142,7 @@ static HeaderPaths dumpHeaderPaths(const FilePath &compiler, const Core::Id lang
|
||||
|
||||
CommandLine cmd(compiler, {fakeIn.fileName()});
|
||||
if (languageId == ProjectExplorer::Constants::CXX_LANGUAGE_ID)
|
||||
cmd.addArg("--c++");
|
||||
cmd.addArg(cppLanguageOption(compiler));
|
||||
cmd.addArg("--preinclude");
|
||||
cmd.addArg(".");
|
||||
|
||||
|
@@ -84,15 +84,6 @@ bool writeFile(const QString &filePath, const QByteArray &contents)
|
||||
return true;
|
||||
}
|
||||
|
||||
void insertTextAtTopOfEditor(TextEditor::BaseTextEditor *editor, const QByteArray &text)
|
||||
{
|
||||
QTC_ASSERT(editor, return);
|
||||
::Utils::ChangeSet cs;
|
||||
cs.insert(0, QString::fromUtf8(text));
|
||||
QTextCursor textCursor = editor->textCursor();
|
||||
cs.apply(&textCursor);
|
||||
}
|
||||
|
||||
class ChangeDocumentReloadSetting
|
||||
{
|
||||
public:
|
||||
@@ -697,126 +688,6 @@ void ClangCodeCompletionTest::testCompleteProjectDependingCodeInGeneratedUiFile(
|
||||
QVERIFY(hasItem(proposal, "setupUi"));
|
||||
}
|
||||
|
||||
void ClangCodeCompletionTest::testCompleteAfterModifyingIncludedHeaderInOtherEditor()
|
||||
{
|
||||
QSKIP("We don't reparse anymore before a code completion so we get wrong completion results.");
|
||||
|
||||
CppTools::Tests::TemporaryDir temporaryDir;
|
||||
const TestDocument sourceDocument("mysource.cpp", &temporaryDir);
|
||||
QVERIFY(sourceDocument.isCreatedAndHasValidCursorPosition());
|
||||
const TestDocument headerDocument("myheader.h", &temporaryDir);
|
||||
QVERIFY(headerDocument.isCreated());
|
||||
|
||||
// Test that declarations from header file are visible in source file
|
||||
OpenEditorAtCursorPosition openSource(sourceDocument);
|
||||
QVERIFY(openSource.succeeded());
|
||||
TextEditor::ProposalModelPtr proposal = completionResults(openSource.editor());
|
||||
QVERIFY(hasItem(proposal, "globalFromHeader"));
|
||||
|
||||
// Open header and insert a new declaration
|
||||
OpenEditorAtCursorPosition openHeader(headerDocument);
|
||||
QVERIFY(openHeader.succeeded());
|
||||
insertTextAtTopOfEditor(openHeader.editor(), "int globalFromHeaderUnsaved;\n");
|
||||
|
||||
// Switch back to source file and check if modified header is reflected in completions.
|
||||
Core::EditorManager::activateEditor(openSource.editor());
|
||||
QCoreApplication::processEvents(); // connections are queued
|
||||
proposal = completionResults(openSource.editor());
|
||||
QVERIFY(hasItem(proposal, "globalFromHeader"));
|
||||
QVERIFY(hasItem(proposal, "globalFromHeaderUnsaved"));
|
||||
}
|
||||
|
||||
void ClangCodeCompletionTest::testCompleteAfterModifyingIncludedHeaderByRefactoringActions()
|
||||
{
|
||||
QSKIP("We don't reparse anymore before a code completion so we get wrong completion results.");
|
||||
|
||||
CppTools::Tests::TemporaryDir temporaryDir;
|
||||
const TestDocument sourceDocument("mysource.cpp", &temporaryDir);
|
||||
QVERIFY(sourceDocument.isCreatedAndHasValidCursorPosition());
|
||||
const TestDocument headerDocument("myheader.h", &temporaryDir);
|
||||
QVERIFY(headerDocument.isCreated());
|
||||
|
||||
// Open header
|
||||
OpenEditorAtCursorPosition openHeader(headerDocument);
|
||||
QVERIFY(openHeader.succeeded());
|
||||
|
||||
// Open source and test that declaration from header file is visible in source file
|
||||
OpenEditorAtCursorPosition openSource(sourceDocument);
|
||||
QVERIFY(openSource.succeeded());
|
||||
TextEditor::ProposalModelPtr proposal = completionResults(openSource.editor());
|
||||
QVERIFY(hasItem(proposal, "globalFromHeader"));
|
||||
|
||||
// Modify header document without switching to its editor.
|
||||
// This simulates e.g. changes from refactoring actions.
|
||||
::Utils::ChangeSet cs;
|
||||
cs.insert(0, QLatin1String("int globalFromHeaderUnsaved;\n"));
|
||||
QTextCursor textCursor = openHeader.editor()->textCursor();
|
||||
cs.apply(&textCursor);
|
||||
|
||||
// Check whether modified header is reflected in the completions.
|
||||
proposal = completionResults(openSource.editor());
|
||||
QVERIFY(hasItem(proposal, "globalFromHeader"));
|
||||
QVERIFY(hasItem(proposal, "globalFromHeaderUnsaved"));
|
||||
}
|
||||
|
||||
void ClangCodeCompletionTest::testCompleteAfterChangingIncludedAndOpenHeaderExternally()
|
||||
{
|
||||
QSKIP("The file system watcher is doing it in backend process but we wait not long enough");
|
||||
|
||||
ChangeDocumentReloadSetting reloadSettingsChanger(Core::IDocument::ReloadUnmodified);
|
||||
|
||||
CppTools::Tests::TemporaryDir temporaryDir;
|
||||
const TestDocument sourceDocument("mysource.cpp", &temporaryDir);
|
||||
QVERIFY(sourceDocument.isCreatedAndHasValidCursorPosition());
|
||||
const TestDocument headerDocument("myheader.h", &temporaryDir);
|
||||
QVERIFY(headerDocument.isCreated());
|
||||
|
||||
// Open header
|
||||
OpenEditorAtCursorPosition openHeader(headerDocument);
|
||||
QVERIFY(openHeader.succeeded());
|
||||
|
||||
// Open source and test completions
|
||||
OpenEditorAtCursorPosition openSource(sourceDocument);
|
||||
QVERIFY(openSource.succeeded());
|
||||
TextEditor::ProposalModelPtr proposal = completionResults(openSource.editor());
|
||||
QVERIFY(hasItem(proposal, "globalFromHeader"));
|
||||
|
||||
// Simulate external modification and wait for reload
|
||||
WriteFileAndWaitForReloadedDocument waitForReloadedDocument(
|
||||
headerDocument.filePath,
|
||||
"int globalFromHeaderReloaded;\n",
|
||||
openHeader.editor()->document());
|
||||
QVERIFY(waitForReloadedDocument.wait());
|
||||
|
||||
// Retrigger completion and check if its updated
|
||||
proposal = completionResults(openSource.editor());
|
||||
QVERIFY(hasItem(proposal, "globalFromHeaderReloaded"));
|
||||
}
|
||||
|
||||
void ClangCodeCompletionTest::testCompleteAfterChangingIncludedAndNotOpenHeaderExternally()
|
||||
{
|
||||
QSKIP("The file system watcher is doing it in backend process but we wait not long enough");
|
||||
|
||||
CppTools::Tests::TemporaryDir temporaryDir;
|
||||
const TestDocument sourceDocument("mysource.cpp", &temporaryDir);
|
||||
QVERIFY(sourceDocument.isCreatedAndHasValidCursorPosition());
|
||||
const TestDocument headerDocument("myheader.h", &temporaryDir);
|
||||
QVERIFY(headerDocument.isCreated());
|
||||
|
||||
// Open source and test completions
|
||||
OpenEditorAtCursorPosition openSource(sourceDocument);
|
||||
QVERIFY(openSource.succeeded());
|
||||
TextEditor::ProposalModelPtr proposal = completionResults(openSource.editor());
|
||||
QVERIFY(hasItem(proposal, "globalFromHeader"));
|
||||
|
||||
// Simulate external modification, e.g version control checkout
|
||||
QVERIFY(writeFile(headerDocument.filePath, "int globalFromHeaderReloaded;\n"));
|
||||
|
||||
// Retrigger completion and check if its updated
|
||||
proposal = completionResults(openSource.editor());
|
||||
QVERIFY(hasItem(proposal, "globalFromHeaderReloaded"));
|
||||
}
|
||||
|
||||
} // namespace Tests
|
||||
} // namespace Internal
|
||||
} // namespace ClangCodeModel
|
||||
|
@@ -54,11 +54,6 @@ private slots:
|
||||
void testCompleteProjectDependingCode();
|
||||
void testCompleteProjectDependingCodeAfterChangingProject();
|
||||
void testCompleteProjectDependingCodeInGeneratedUiFile();
|
||||
|
||||
void testCompleteAfterModifyingIncludedHeaderInOtherEditor();
|
||||
void testCompleteAfterModifyingIncludedHeaderByRefactoringActions();
|
||||
void testCompleteAfterChangingIncludedAndOpenHeaderExternally();
|
||||
void testCompleteAfterChangingIncludedAndNotOpenHeaderExternally();
|
||||
};
|
||||
|
||||
} // namespace Tests
|
||||
|
@@ -101,7 +101,6 @@ UseSelectionsTestCase::UseSelectionsTestCase(TestDocument &testFile,
|
||||
bool hasTimedOut;
|
||||
const SelectionList selections = waitForUseSelections(&hasTimedOut);
|
||||
QEXPECT_FAIL("non-local use as macro argument - argument expanded 1", "TODO", Abort);
|
||||
QEXPECT_FAIL("macro use 2", "TODO", Abort);
|
||||
QVERIFY(!hasTimedOut);
|
||||
// foreach (const Selection &selection, selections)
|
||||
// qDebug() << QTest::toString(selection);
|
||||
|
@@ -1430,6 +1430,8 @@ WarningFlags ClangToolChain::warningFlags(const QStringList &cflags) const
|
||||
|
||||
QStringList ClangToolChain::suggestedMkspecList() const
|
||||
{
|
||||
if (const ToolChain * const parentTc = ToolChainManager::findToolChain(m_parentToolChainId))
|
||||
return parentTc->suggestedMkspecList();
|
||||
const Abi abi = targetAbi();
|
||||
if (abi.os() == Abi::DarwinOS)
|
||||
return {"macx-clang", "macx-clang-32", "unsupported/macx-clang", "macx-ios-clang"};
|
||||
@@ -1664,6 +1666,8 @@ void ClangToolChainConfigWidget::applyImpl()
|
||||
for (const ToolChain *mingwTC : mingwToolChains()) {
|
||||
if (parentId == mingwTC->id()) {
|
||||
tc->m_parentToolChainId = mingwTC->id();
|
||||
tc->setTargetAbi(mingwTC->targetAbi());
|
||||
tc->setSupportedAbis(mingwTC->supportedAbis());
|
||||
break;
|
||||
}
|
||||
}
|
||||
|
@@ -399,7 +399,7 @@ public:
|
||||
|
||||
if (role == ContextMenuItemAdderRole) {
|
||||
auto *menu = data.value<QMenu *>();
|
||||
addToContextMenu(menu);
|
||||
addToContextMenu(menu, flags(column) & Qt::ItemIsSelectable);
|
||||
return true;
|
||||
}
|
||||
|
||||
@@ -440,7 +440,7 @@ public:
|
||||
return false;
|
||||
}
|
||||
|
||||
void addToContextMenu(QMenu *menu)
|
||||
void addToContextMenu(QMenu *menu, bool isSelectable)
|
||||
{
|
||||
Kit *kit = KitManager::kit(m_kitId);
|
||||
QTC_ASSERT(kit, return);
|
||||
@@ -448,13 +448,13 @@ public:
|
||||
const QString projectName = m_project->displayName();
|
||||
|
||||
QAction *enableAction = menu->addAction(tr("Enable Kit \"%1\" for Project \"%2\"").arg(kitName, projectName));
|
||||
enableAction->setEnabled(m_kitId.isValid() && !isEnabled());
|
||||
enableAction->setEnabled(isSelectable && m_kitId.isValid() && !isEnabled());
|
||||
QObject::connect(enableAction, &QAction::triggered, [this, kit] {
|
||||
m_project->addTarget(m_project->createTarget(kit));
|
||||
});
|
||||
|
||||
QAction *disableAction = menu->addAction(tr("Disable Kit \"%1\" for Project \"%2\"").arg(kitName, projectName));
|
||||
disableAction->setEnabled(m_kitId.isValid() && isEnabled());
|
||||
disableAction->setEnabled(isSelectable && m_kitId.isValid() && isEnabled());
|
||||
QObject::connect(disableAction, &QAction::triggered, m_project, [this] {
|
||||
Target *t = target();
|
||||
QTC_ASSERT(t, return);
|
||||
|
@@ -275,6 +275,8 @@ QVariantMap DefaultPropertyProvider::autoGeneratedProperties(const ProjectExplor
|
||||
ProjectExplorer::Abi::abiFromTargetTriplet(mainTc->originalTargetTriple())
|
||||
|| targetAbi.osFlavor() == ProjectExplorer::Abi::AndroidLinuxFlavor) {
|
||||
data.insert(QLatin1String(QBS_ARCHITECTURE), architecture(mainTc->targetAbi()));
|
||||
} else if (archs.count() == 1) {
|
||||
data.insert(QLatin1String(QBS_ARCHITECTURE), archs.first());
|
||||
}
|
||||
data.insert(QLatin1String(QBS_TARGETPLATFORM), targetPlatform(targetAbi, k));
|
||||
|
||||
|
@@ -234,6 +234,7 @@ ResourceTopLevelNode::ResourceTopLevelNode(const FilePath &filePath,
|
||||
setPriority(Node::DefaultFilePriority);
|
||||
setListInProject(true);
|
||||
setAddFileFilter("*.png; *.jpg; *.gif; *.svg; *.ico; *.qml; *.qml.ui");
|
||||
setShowWhenEmpty(true);
|
||||
|
||||
if (!filePath.isEmpty()) {
|
||||
QFileInfo fi = filePath.toFileInfo();
|
||||
@@ -470,7 +471,6 @@ ResourceFolderNode::ResourceFolderNode(const QString &prefix, const QString &lan
|
||||
m_prefix(prefix),
|
||||
m_lang(lang)
|
||||
{
|
||||
setShowWhenEmpty(true);
|
||||
}
|
||||
|
||||
ResourceFolderNode::~ResourceFolderNode() = default;
|
||||
|
@@ -75,7 +75,7 @@ void OptionsDialog::addToKeywordsList(const Keyword &keyword)
|
||||
QListWidgetItem *item = new QListWidgetItem(
|
||||
icon(keyword.iconType), keyword.name);
|
||||
item->setData(Qt::UserRole, static_cast<int>(keyword.iconType));
|
||||
item->setTextColor(keyword.color);
|
||||
item->setForeground(keyword.color);
|
||||
ui->keywordsList->addItem(item);
|
||||
}
|
||||
|
||||
@@ -179,7 +179,7 @@ Settings OptionsDialog::settingsFromUi()
|
||||
Keyword keyword;
|
||||
keyword.name = item->text();
|
||||
keyword.iconType = static_cast<IconType>(item->data(Qt::UserRole).toInt());
|
||||
keyword.color = item->textColor();
|
||||
keyword.color = item->foreground().color();
|
||||
|
||||
settings.keywords << keyword;
|
||||
}
|
||||
|
@@ -97,7 +97,7 @@ def __createProjectOrFileSelectType__(category, template, fromWelcome = False, i
|
||||
clickButton(waitForObject("{text='Choose...' type='QPushButton' unnamed='1' visible='1'}"))
|
||||
return __getSupportedPlatforms__(str(text), template)[0]
|
||||
|
||||
def __createProjectSetNameAndPath__(path, projectName = None, checks = True, libType = None):
|
||||
def __createProjectSetNameAndPath__(path, projectName = None, checks = True):
|
||||
directoryEdit = waitForObject("{type='Utils::FancyLineEdit' unnamed='1' visible='1' "
|
||||
"toolTip?='Full path: *'}")
|
||||
replaceEditorContent(directoryEdit, path)
|
||||
@@ -113,10 +113,6 @@ def __createProjectSetNameAndPath__(path, projectName = None, checks = True, lib
|
||||
test.verify(labelCheck, "Project name and base directory without warning or error")
|
||||
# make sure this is not set as default location
|
||||
ensureChecked("{type='QCheckBox' name='projectsDirectoryCheckBox' visible='1'}", False)
|
||||
if libType != None:
|
||||
selectFromCombo(waitForObject("{leftWidget={text='Type' type='QLabel' unnamed='1' "
|
||||
"visible='1'} type='QComboBox' unnamed='1' visible='1'}"),
|
||||
LibType.getStringForLib(libType))
|
||||
clickButton(waitForObject(":Next_QPushButton"))
|
||||
return str(projectName)
|
||||
|
||||
@@ -365,22 +361,28 @@ def createNewCPPLib(projectDir, projectName, className, target, isStatic):
|
||||
libType = LibType.SHARED
|
||||
if projectDir == None:
|
||||
projectDir = tempDir()
|
||||
projectName = __createProjectSetNameAndPath__(projectDir, projectName, False, libType)
|
||||
__chooseTargets__(target, available)
|
||||
snooze(1)
|
||||
clickButton(waitForObject(":Next_QPushButton"))
|
||||
__createProjectHandleModuleSelection__(["QtCore"])
|
||||
projectName = __createProjectSetNameAndPath__(projectDir, projectName, False)
|
||||
__handleBuildSystem__(None)
|
||||
selectFromCombo(waitForObject("{name='Type' type='QComboBox' visible='1' "
|
||||
"window=':New_ProjectExplorer::JsonWizard'}"),
|
||||
LibType.getStringForLib(libType))
|
||||
__createProjectHandleModuleSelection__("Core")
|
||||
className = __createProjectHandleClassInformation__(className)
|
||||
__chooseTargets__(target, available)
|
||||
clickButton(waitForObject(":Next_QPushButton"))
|
||||
__createProjectHandleLastPage__()
|
||||
return projectName, className
|
||||
|
||||
def createNewQtPlugin(projectDir, projectName, className, target, baseClass="QGenericPlugin"):
|
||||
available = __createProjectOrFileSelectType__(" Library", "C++ Library", False, True)
|
||||
projectName = __createProjectSetNameAndPath__(projectDir, projectName, False, LibType.QT_PLUGIN)
|
||||
__chooseTargets__(target, available)
|
||||
snooze(1)
|
||||
clickButton(waitForObject(":Next_QPushButton"))
|
||||
projectName = __createProjectSetNameAndPath__(projectDir, projectName, False)
|
||||
__handleBuildSystem__(None)
|
||||
selectFromCombo(waitForObject("{name='Type' type='QComboBox' visible='1' "
|
||||
"window=':New_ProjectExplorer::JsonWizard'}"),
|
||||
LibType.getStringForLib(LibType.QT_PLUGIN))
|
||||
className = __createProjectHandleClassInformation__(className, baseClass)
|
||||
__chooseTargets__(target, available)
|
||||
clickButton(waitForObject(":Next_QPushButton"))
|
||||
__createProjectHandleLastPage__()
|
||||
return projectName, className
|
||||
|
||||
@@ -422,36 +424,18 @@ def __chooseTargets__(targets, availableTargets=None, additionalFunc=None):
|
||||
test.warning("Target '%s' is not set up correctly." % Targets.getStringForTarget(current))
|
||||
return checkedTargets
|
||||
|
||||
def __createProjectHandleModuleSelection__(modules):
|
||||
modulesPage = waitForObject("{type='QmakeProjectManager::Internal::ModulesPage' unnamed='1' "
|
||||
"visible='1'}")
|
||||
chckBoxes = filter(lambda x: className(x) == 'QCheckBox', object.children(modulesPage))
|
||||
chckBoxLabels = set([str(cb.text) for cb in chckBoxes])
|
||||
if not set(modules).issubset(chckBoxLabels):
|
||||
test.fatal("You want to check module(s) not available at 'Module Selection' page.",
|
||||
"Not available: %s" % str(set(modules).difference(chckBoxLabels)))
|
||||
for checkBox in chckBoxes:
|
||||
test.log("(Un)Checking module checkbox '%s'" % str(checkBox.text))
|
||||
ensureChecked(checkBox, str(checkBox.text) in modules, 3000)
|
||||
clickButton(waitForObject(":Next_QPushButton"))
|
||||
def __createProjectHandleModuleSelection__(module):
|
||||
selectFromCombo(waitForObject("{name='LibraryQtModule' type='QComboBox' visible='1' "
|
||||
"window=':New_ProjectExplorer::JsonWizard'}"), module)
|
||||
|
||||
def __createProjectHandleClassInformation__(className, baseClass=None):
|
||||
if baseClass:
|
||||
selectFromCombo("{name='baseClassComboBox' type='QComboBox' visible='1'}", baseClass)
|
||||
classLineEd = waitForObject("{name='classLineEdit' type='Utils::ClassNameValidatingLineEdit' "
|
||||
"visible='1'}")
|
||||
result = str(classLineEd.text)
|
||||
if className:
|
||||
replaceEditorContent(classLineEd, className)
|
||||
try:
|
||||
waitForObject("{text='The class name contains invalid characters.' type='QLabel' "
|
||||
"unnamed='1' visible='1'}", 1000)
|
||||
test.fatal("Class name contains invalid characters - using default.")
|
||||
replaceEditorContent(classLineEd, result)
|
||||
except:
|
||||
result = className
|
||||
selectFromCombo("{name='BaseClassInfo' type='QComboBox' visible='1' "
|
||||
"window=':New_ProjectExplorer::JsonWizard'}", baseClass)
|
||||
replaceEditorContent(waitForObject("{name='Class' type='Utils::FancyLineEdit' visible='1' "
|
||||
"window=':New_ProjectExplorer::JsonWizard'}"), className)
|
||||
clickButton(waitForObject(":Next_QPushButton"))
|
||||
return result
|
||||
return className
|
||||
|
||||
def waitForProcessRunning(running=True):
|
||||
outputButton = waitForObject(":Qt Creator_AppOutput_Core::Internal::OutputPaneToggleButton")
|
||||
|
@@ -81,7 +81,12 @@ def main():
|
||||
# are there more Quick combinations - then recreate this project
|
||||
if counter < len(qtVersionsForQuick) - 1:
|
||||
displayedPlatforms = __createProject__(category, template)
|
||||
continue
|
||||
elif template in ("Qt Widgets Application", "C++ Library"):
|
||||
def skipDetails(_):
|
||||
clickButton(waitForObject(":Next_QPushButton"))
|
||||
handleBuildSystemVerifyKits(category, template, kits,
|
||||
displayedPlatforms, skipDetails)
|
||||
else:
|
||||
handleBuildSystemVerifyKits(category, template, kits, displayedPlatforms)
|
||||
|
||||
invokeMenuItem("File", "Exit")
|
||||
|
@@ -1,5 +1,5 @@
|
||||
"language" "Exit" "ISO"
|
||||
"Czech (CzechRepublic)" "Ukončit" "cs_CZ"
|
||||
"Czech (Czech Republic)" "Ukončit" "cs_CZ"
|
||||
"Danish (Denmark)" "Afslut" "da_DK"
|
||||
"German (Germany)" "Beenden" "de_DE"
|
||||
"French (France)" "Quitter" "fr_FR"
|
||||
|
|