Merge remote-tracking branch 'origin/4.0'

This commit is contained in:
Oswald Buddenhagen
2016-03-22 15:23:12 +01:00
208 changed files with 2314 additions and 2244 deletions

View File

@@ -10,13 +10,13 @@ Windows XP SP3 or later
(K)Ubuntu Linux 11.10 (32-bit and 64-bit) or later
Mac OS X 10.7 or later
Building the sources requires Qt 5.4.0 or later.
Building the sources requires Qt 5.5.0 or later.
## Compiling Qt Creator
Prerequisites:
* Qt 5.4.0 or later
* Qt 5.5.0 or later
* On Windows:
* ActiveState Active Perl
* MinGW with g++ 4.7 or Visual Studio 2013 Update 2 or later
@@ -58,7 +58,7 @@ For detailed information on the supported compilers, see
for example, `c:\work`. If you plan to use MinGW and Microsoft Visual
Studio simultaneously or mix different Qt versions, we recommend
creating a directory structure which reflects that. For example:
`C:\work\qt5.4.1-vs12, C:\work\qt5.4.1-mingw`.
`C:\work\qt5.5.1-vs12, C:\work\qt5.5.1-mingw`.
4. Download and install Perl from <https://www.activestate.com/activeperl>
and check that perl.exe is added to the path. Run `perl -v` to verify

View File

@@ -10,7 +10,7 @@ QtcProduct {
property var pluginRecommends: []
property var pluginTestDepends: []
property string minimumQtVersion: "5.4.0"
property string minimumQtVersion: "5.5.0"
condition: QtcFunctions.versionIsAtLeast(Qt.core.version, minimumQtVersion)
targetName: QtcFunctions.qtLibraryName(qbs, name)

View File

@@ -1,9 +1,9 @@
include(qtcreator.pri)
#version check qt
!minQtVersion(5, 4, 0) {
!minQtVersion(5, 5, 0) {
message("Cannot build Qt Creator with Qt version $${QT_VERSION}.")
error("Use at least Qt 5.4.0.")
error("Use at least Qt 5.5.0.")
}
include(doc/doc.pri)

View File

@@ -2152,8 +2152,12 @@ def qdump__QVariant(d, value):
data = value["d"]["data"]
ns = d.qtNamespace()
inner = ns + innert
if d.isLldb:
# Looking up typedefs is problematic.
innerType = d.lookupType(inner)
if innerType is None:
# Looking up typedefs is problematic with LLDB, and can also
# happen with GDB e.g. in the QVariant2 dumper test on x86
# unless further use of the empty QVariantHash is added.
if innert == "QVariantMap":
inner = "%sQMap<%sQString, %sQVariant>" % (ns, ns, ns)
elif innert == "QVariantHash":
@@ -2162,6 +2166,10 @@ def qdump__QVariant(d, value):
inner = "%sQList<%sQVariant>" % (ns, ns)
innerType = d.lookupType(inner)
if innerType is None:
self.putSpecialValue("notaccessible")
return innert
if toInteger(value["d"]["is_shared"]):
val = data["ptr"].cast(innerType.pointer().pointer()).dereference().dereference()
else:

View File

@@ -121,7 +121,7 @@ void DesignerCustomObjectData::populateResetHashes()
PropertyNameList propertyNameList = QmlPrivateGate::propertyNameListForWritableProperties(object());
foreach (const PropertyName &propertyName, propertyNameList) {
QQmlProperty property(object(), propertyName, QQmlEngine::contextForObject(object()));
QQmlProperty property(object(), QString::fromUtf8(propertyName), QQmlEngine::contextForObject(object()));
#if (QT_VERSION >= QT_VERSION_CHECK(5, 6, 0))
QQmlAbstractBinding::Ptr binding = QQmlAbstractBinding::Ptr(QQmlPropertyPrivate::binding(property));
@@ -154,7 +154,7 @@ QVariant DesignerCustomObjectData::getResetValue(const PropertyName &propertyNam
void DesignerCustomObjectData::doResetProperty(QQmlContext *context, const PropertyName &propertyName)
{
QQmlProperty property(object(), propertyName, context);
QQmlProperty property(object(), QString::fromUtf8(propertyName), context);
if (!property.isValid())
return;
@@ -230,7 +230,7 @@ bool DesignerCustomObjectData::hasBindingForProperty(QQmlContext *context, const
if (QmlPrivateGate::isPropertyBlackListed(propertyName))
return false;
QQmlProperty property(object(), propertyName, context);
QQmlProperty property(object(), QString::fromUtf8(propertyName), context);
bool hasBinding = QQmlPropertyPrivate::binding(property);
@@ -245,7 +245,7 @@ bool DesignerCustomObjectData::hasBindingForProperty(QQmlContext *context, const
void DesignerCustomObjectData::setPropertyBinding(QQmlContext *context, const PropertyName &propertyName, const QString &expression)
{
QQmlProperty property(object(), propertyName, context);
QQmlProperty property(object(), QString::fromUtf8(propertyName), context);
if (!property.isValid())
return;
@@ -281,7 +281,7 @@ void DesignerCustomObjectData::keepBindingFromGettingDeleted(QQmlContext *contex
Q_UNUSED(context)
Q_UNUSED(propertyName)
#else
QQmlProperty property(object(), propertyName, context);
QQmlProperty property(object(), QString::fromUtf8(propertyName), context);
QQmlPropertyPrivate::setBinding(property, 0, QQmlPropertyPrivate::BypassInterceptor
| QQmlPropertyPrivate::DontRemoveBinding);
#endif

View File

@@ -199,7 +199,7 @@ static void allSubObject(QObject *object, QObjectList &objectList)
if (metaProperty.isReadable()
&& metaProperty.isWritable()
&& QQmlMetaType::isQObject(metaProperty.userType())) {
if (metaProperty.name() != QLatin1String("parent")) {
if (metaProperty.name() != "parent") {
QObject *propertyObject = QQmlMetaType::toQObject(metaProperty.read(object));
allSubObject(propertyObject, objectList);
}
@@ -242,7 +242,7 @@ static void fixResourcePathsForObject(QObject *object)
PropertyNameList propertyNameList = propertyNameListForWritableProperties(object);
foreach (const PropertyName &propertyName, propertyNameList) {
QQmlProperty property(object, propertyName, QQmlEngine::contextForObject(object));
QQmlProperty property(object, QString::fromUtf8(propertyName), QQmlEngine::contextForObject(object));
const QVariant value = property.read();
const QVariant fixedValue = fixResourcePaths(value);
@@ -289,7 +289,7 @@ static bool isWindow(QObject *object) {
static QQmlType *getQmlType(const QString &typeName, int majorNumber, int minorNumber)
{
return QQmlMetaType::qmlType(typeName.toUtf8(), majorNumber, minorNumber);
return QQmlMetaType::qmlType(typeName, majorNumber, minorNumber);
}
static bool isCrashingType(QQmlType *type)
@@ -380,7 +380,7 @@ QVariant fixResourcePaths(const QVariant &value)
const QUrl url = value.toUrl();
if (url.scheme() == QLatin1String("qrc")) {
const QString path = QLatin1String("qrc:") + url.path();
QString qrcSearchPath = qgetenv("QMLDESIGNER_RC_PATHS");
QString qrcSearchPath = QString::fromLocal8Bit(qgetenv("QMLDESIGNER_RC_PATHS"));
if (!qrcSearchPath.isEmpty()) {
const QStringList searchPaths = qrcSearchPath.split(QLatin1Char(';'));
foreach (const QString &qrcPath, searchPaths) {
@@ -401,7 +401,7 @@ QVariant fixResourcePaths(const QVariant &value)
if (value.type() == QVariant::String) {
const QString str = value.toString();
if (str.contains(QLatin1String("qrc:"))) {
QString qrcSearchPath = qgetenv("QMLDESIGNER_RC_PATHS");
QString qrcSearchPath = QString::fromLocal8Bit(qgetenv("QMLDESIGNER_RC_PATHS"));
if (!qrcSearchPath.isEmpty()) {
const QStringList searchPaths = qrcSearchPath.split(QLatin1Char(';'));
foreach (const QString &qrcPath, searchPaths) {
@@ -695,7 +695,7 @@ void removeProperty(QObject *propertyChanges, const PropertyName &propertyName)
if (!propertyChange)
return;
propertyChange->removeProperty(propertyName);
propertyChange->removeProperty(QString::fromUtf8(propertyName));
}
QVariant getProperty(QObject *propertyChanges, const PropertyName &propertyName)
@@ -705,7 +705,7 @@ QVariant getProperty(QObject *propertyChanges, const PropertyName &propertyName)
if (!propertyChange)
return QVariant();
return propertyChange->property(propertyName);
return propertyChange->property(QString::fromUtf8(propertyName));
}
void changeValue(QObject *propertyChanges, const PropertyName &propertyName, const QVariant &value)
@@ -715,7 +715,7 @@ void changeValue(QObject *propertyChanges, const PropertyName &propertyName, con
if (!propertyChange)
return;
propertyChange->changeValue(propertyName, value);
propertyChange->changeValue(QString::fromUtf8(propertyName), value);
}
void changeExpression(QObject *propertyChanges, const PropertyName &propertyName, const QString &expression)
@@ -725,7 +725,7 @@ void changeExpression(QObject *propertyChanges, const PropertyName &propertyName
if (!propertyChange)
return;
propertyChange->changeExpression(propertyName, expression);
propertyChange->changeExpression(QString::fromUtf8(propertyName), expression);
}
QObject *stateObject(QObject *propertyChanges)

View File

@@ -34,7 +34,7 @@
"trDisplayName": "Class name:",
"mandatory": true,
"type": "LineEdit",
"data": { "validator": "(?:(?:[a-zA-Z_][a-zA-Z_0-9]*::)+[a-zA-Z_][a-zA-Z_0-9]*|)" }
"data": { "validator": "(?:(?:[a-zA-Z_][a-zA-Z_0-9]*::)*[a-zA-Z_][a-zA-Z_0-9]*|)" }
},
{
"name": "BaseCB",

View File

@@ -31,7 +31,7 @@
"trDisplayName": "Class name:",
"mandatory": true,
"type": "LineEdit",
"data": { "validator": "(?:(?:[a-zA-Z_][a-zA-Z_0-9]*::)+[a-zA-Z_][a-zA-Z_0-9]*|)" }
"data": { "validator": "(?:(?:[a-zA-Z_][a-zA-Z_0-9]*::)*[a-zA-Z_][a-zA-Z_0-9]*|)" }
},
{
"name": "Base",

View File

@@ -1,5 +1,5 @@
[General]
ThemeName=dark
ThemeName=Dark
PreferredStyles=Fusion
DefaultTextEditorColorScheme=dark.xml
@@ -7,8 +7,8 @@ DefaultTextEditorColorScheme=dark.xml
shadowBackground=ff232323
text=ffe7e7e7
textDisabled=7fffffff
hoverBackground=ff515151
selectedBackground=ff151515
hoverBackground=18ffffff
selectedBackground=46ffffff
normalBackground=ff333333
alternateBackground=ff515151
error=ffff0000
@@ -19,7 +19,7 @@ BackgroundColorDark=shadowBackground
BackgroundColorHover=hoverBackground
BackgroundColorNormal=normalBackground
BackgroundColorDisabled=ff444444
BackgroundColorSelected=ff909090
BackgroundColorSelected=selectedBackground
BadgeLabelBackgroundColorChecked=normalBackground
BadgeLabelBackgroundColorUnchecked=selectedBackground
BadgeLabelTextColorChecked=text
@@ -47,7 +47,7 @@ FancyTabWidgetDisabledUnselectedTextColor=textDisabled
FancyTabWidgetEnabledSelectedTextColor=text
FancyTabWidgetEnabledUnselectedTextColor=text
FancyToolButtonHoverColor=35ffffff
FancyToolButtonSelectedColor=7effffff
FancyToolButtonSelectedColor=selectedBackground
FutureProgressBackgroundColor=shadowBackground
IconsBaseColor=ffdcdcdc
IconsDisabledColor=textDisabled
@@ -83,7 +83,6 @@ MiniProjectTargetSelectorBackgroundColor=shadowBackground
MiniProjectTargetSelectorBorderColor=shadowBackground
MiniProjectTargetSelectorSummaryBackgroundColor=shadowBackground
MiniProjectTargetSelectorTextColor=text
PanelButtonToolBackgroundColorHover=hoverBackground
PanelStatusBarBackgroundColor=shadowBackground
PanelsWidgetSeparatorLineColor=0
PanelTextColorDark=text
@@ -93,6 +92,7 @@ ProgressBarColorError=error
ProgressBarColorFinished=ff5aaa3c
ProgressBarColorNormal=ff808080
ProgressBarTitleColor=text
ProgressBarBackgroundColor=normalBackground
SplitterColor=ff313131
TextColorDisabled=textDisabled
TextColorError=ffff4040
@@ -113,6 +113,14 @@ OutputPanes_NormalMessageTextColor=text
OutputPanes_StdErrTextColor=ffff6666
OutputPanes_StdOutTextColor=text
OutputPanes_WarningMessageTextColor=fff3c300
OutputPanes_TestPassTextColor=ff00b400
OutputPanes_TestFailTextColor=ffc82828
OutputPanes_TestXFailTextColor=ff28dc28
OutputPanes_TestXPassTextColor=ffdc2828
OutputPanes_TestSkipTextColor=ff828282
OutputPanes_TestWarnTextColor=ffc8c800
OutputPanes_TestFatalTextColor=ffb42828
OutputPanes_TestDebugTextColor=ff329696
OutputPaneButtonFlashColor=error
OutputPaneToggleButtonTextColorChecked=text
OutputPaneToggleButtonTextColorUnchecked=text
@@ -127,25 +135,14 @@ Debugger_WatchItem_ValueChanged=ffbf0303
Debugger_Breakpoint_TextMarkColor=ffff4040
Welcome_BackgroundColorNormal=normalBackground
Welcome_Button_BorderColorNormal=0
Welcome_Button_BorderColorPressed=0
Welcome_Button_TextColorNormal=ffe7e7e7
Welcome_Button_TextColorPressed=ffffffff
Welcome_Caption_TextColorNormal=ff4acb47
Welcome_DividerColor=ff232323
Welcome_Link_BackgroundColor=ff333333
Welcome_Link_TextColorActive=fff0f0f0
Welcome_Link_TextColorNormal=text
Welcome_ProjectItem_BackgroundColorHover=0
Welcome_ProjectItem_TextColorFilepath=textDisabled
Welcome_SessionItemExpanded_BackgroundColorHover=hoverBackground
Welcome_SessionItemExpanded_BackgroundColorNormal=selectedBackground
Welcome_SessionItem_BackgroundColorHover=hoverBackground
Welcome_SessionItem_BackgroundColorNormal=0
Welcome_SideBar_BackgroundColor=ff434343
Welcome_TextColorHeading=text
Welcome_TextColorNormal=text
Welcome_TextColor=text
Welcome_ForegroundPrimaryColor=ff999999
Welcome_ForegroundSecondaryColor=ff808080
Welcome_BackgroundColor=normalBackground
Welcome_ButtonBackgroundColor=normalBackground
Welcome_DividerColor=ff555555
Welcome_HoverColor=ff444444
Welcome_LinkColor=ff5caa15
VcsBase_FileStatusUnknown_TextColor=text
VcsBase_FileAdded_TextColor=ff00ff00

View File

@@ -1,5 +1,5 @@
[General]
ThemeName=default
ThemeName=Default
PreferredStyles=
[Palette]
@@ -34,7 +34,7 @@ DoubleTabWidget2ndTabActiveTextColor=ffffffff
DoubleTabWidget2ndTabBackgroundColor=ffff0000
DoubleTabWidget2ndTabInactiveTextColor=ff000000
EditorPlaceholderColor=ffe0dcd8
FancyToolBarSeparatorColor=ff000000
FancyToolBarSeparatorColor=60ffffff
FancyTabBarBackgroundColor=ffff0000
FancyTabWidgetDisabledSelectedTextColor=textDisabled
FancyTabWidgetDisabledUnselectedTextColor=textDisabled
@@ -77,8 +77,7 @@ MiniProjectTargetSelectorBackgroundColor=ffa0a0a0
MiniProjectTargetSelectorBorderColor=ff000000
MiniProjectTargetSelectorSummaryBackgroundColor=ff464646
MiniProjectTargetSelectorTextColor=a0ffffff
PanelButtonToolBackgroundColorHover=25ffffff
PanelStatusBarBackgroundColor=ffff0000
PanelStatusBarBackgroundColor=ff626262
PanelsWidgetSeparatorLineColor=ffbfbcb8
PanelTextColorDark=darkText
PanelTextColorMid=ff909090
@@ -87,6 +86,7 @@ ProgressBarColorError=d2ff3c00
ProgressBarColorFinished=ff5aaa3c
ProgressBarColorNormal=b4ffffff
ProgressBarTitleColor=ffffffff
ProgressBarBackgroundColor=18ffffff
SplitterColor=ff151515
TextColorDisabled=ff000000
TextColorError=ffff0000
@@ -107,6 +107,14 @@ OutputPanes_NormalMessageTextColor=ff0000aa
OutputPanes_StdErrTextColor=ffaa0000
OutputPanes_StdOutTextColor=ff000000
OutputPanes_WarningMessageTextColor=ff808000
OutputPanes_TestPassTextColor=ff009900
OutputPanes_TestFailTextColor=ffa00000
OutputPanes_TestXFailTextColor=ff28f028
OutputPanes_TestXPassTextColor=fff02828
OutputPanes_TestSkipTextColor=ff787878
OutputPanes_TestWarnTextColor=ffd0bb00
OutputPanes_TestFatalTextColor=ff640000
OutputPanes_TestDebugTextColor=ff329696
OutputPaneButtonFlashColor=ffff0000
OutputPaneToggleButtonTextColorChecked=ffffffff
OutputPaneToggleButtonTextColorUnchecked=ff000000
@@ -121,25 +129,14 @@ Debugger_WatchItem_ValueChanged=ffc80000
Debugger_Breakpoint_TextMarkColor=ffff4040
Welcome_BackgroundColorNormal=ffffffff
Welcome_Button_BorderColorNormal=ff737373
Welcome_Button_BorderColorPressed=ff333333
Welcome_Button_TextColorNormal=ff000000
Welcome_Button_TextColorPressed=ffc0c0c0
Welcome_Caption_TextColorNormal=ff328930
Welcome_DividerColor=ff737373
Welcome_Link_BackgroundColor=ff909090
Welcome_Link_TextColorActive=fff0f0f0
Welcome_Link_TextColorNormal=ff328930
Welcome_ProjectItem_BackgroundColorHover=fff9f9f9
Welcome_ProjectItem_TextColorFilepath=ff6b6b6b
Welcome_SessionItemExpanded_BackgroundColorHover=ffe9e9e9
Welcome_SessionItemExpanded_BackgroundColorNormal=fff1f1f1
Welcome_SessionItem_BackgroundColorHover=fff9f9f9
Welcome_SessionItem_BackgroundColorNormal=19f9f9f9
Welcome_SideBar_BackgroundColor=ffebebeb
Welcome_TextColorHeading=ff535353
Welcome_TextColorNormal=ff000000
Welcome_TextColor=ff000000
Welcome_ForegroundPrimaryColor=ff555759
Welcome_ForegroundSecondaryColor=ff727476
Welcome_BackgroundColor=fff8f8f8
Welcome_ButtonBackgroundColor=ffdfdfdf
Welcome_DividerColor=ffd6d6d6
Welcome_HoverColor=ffe8e8e8
Welcome_LinkColor=ff5caa15
VcsBase_FileStatusUnknown_TextColor=ff000000
VcsBase_FileAdded_TextColor=ff00aa00

View File

@@ -1,5 +1,5 @@
[General]
ThemeName=Dark Frame
ThemeName=Default Flat
PreferredStyles=
[Palette]
@@ -7,9 +7,9 @@ shadowBackground=ff404244
text=ff000000
textDisabled=55000000
toolBarItem=b6fbfdff
toolBarItemDisabled=88a4a6a8
hoverBackground=ff515151
selectedBackground=ff151515
toolBarItemDisabled=60a4a6a8
hoverBackground=22ffffff
selectedBackground=66000000
normalBackground=ffffffff
alternateBackground=ff515151
error=ffe41e25
@@ -21,7 +21,7 @@ BackgroundColorDark=shadowBackground
BackgroundColorHover=hoverBackground
BackgroundColorNormal=normalBackground
BackgroundColorDisabled=ff444444
BackgroundColorSelected=ff909090
BackgroundColorSelected=selectedBackground
BadgeLabelBackgroundColorChecked=ffe0e0e0
BadgeLabelBackgroundColorUnchecked=ff808080
BadgeLabelTextColorChecked=ff606060
@@ -48,8 +48,8 @@ FancyTabWidgetDisabledSelectedTextColor=toolBarItemDisabled
FancyTabWidgetDisabledUnselectedTextColor=toolBarItemDisabled
FancyTabWidgetEnabledSelectedTextColor=toolBarItem
FancyTabWidgetEnabledUnselectedTextColor=toolBarItem
FancyToolButtonHoverColor=35ffffff
FancyToolButtonSelectedColor=66000000
FancyToolButtonHoverColor=hoverBackground
FancyToolButtonSelectedColor=selectedBackground
FutureProgressBackgroundColor=shadowBackground
IconsBaseColor=toolBarItem
IconsDisabledColor=toolBarItemDisabled
@@ -85,7 +85,6 @@ MiniProjectTargetSelectorBackgroundColor=shadowBackground
MiniProjectTargetSelectorBorderColor=shadowBackground
MiniProjectTargetSelectorSummaryBackgroundColor=shadowBackground
MiniProjectTargetSelectorTextColor=text
PanelButtonToolBackgroundColorHover=hoverBackground
PanelStatusBarBackgroundColor=shadowBackground
PanelsWidgetSeparatorLineColor=0
PanelTextColorDark=text
@@ -95,6 +94,7 @@ ProgressBarColorError=ffdb6f71
ProgressBarColorFinished=dda4d576
ProgressBarColorNormal=ff999999
ProgressBarTitleColor=toolBarItem
ProgressBarBackgroundColor=a0606060
SplitterColor=splitter
TextColorDisabled=textDisabled
TextColorError=ffff4040
@@ -115,6 +115,14 @@ OutputPanes_NormalMessageTextColor=ff0000aa
OutputPanes_StdErrTextColor=ffaa0000
OutputPanes_StdOutTextColor=ff000000
OutputPanes_WarningMessageTextColor=ff808000
OutputPanes_TestPassTextColor=ff009900
OutputPanes_TestFailTextColor=ffa00000
OutputPanes_TestXFailTextColor=ff28f028
OutputPanes_TestXPassTextColor=fff02828
OutputPanes_TestSkipTextColor=ff787878
OutputPanes_TestWarnTextColor=ffd0bb00
OutputPanes_TestFatalTextColor=ff640000
OutputPanes_TestDebugTextColor=ff329696
OutputPaneButtonFlashColor=ffff0000
OutputPaneToggleButtonTextColorChecked=toolBarItem
OutputPaneToggleButtonTextColorUnchecked=toolBarItem
@@ -129,25 +137,14 @@ Debugger_WatchItem_ValueChanged=ffbf0303
Debugger_Breakpoint_TextMarkColor=ffff4040
Welcome_BackgroundColorNormal=normalBackground
Welcome_Button_BorderColorNormal=ff727476
Welcome_Button_BorderColorPressed=ff727476
Welcome_Button_TextColorNormal=text
Welcome_Button_TextColorPressed=text
Welcome_Caption_TextColorNormal=text
Welcome_TextColor=ff000000
Welcome_ForegroundPrimaryColor=ff404244
Welcome_ForegroundSecondaryColor=ff727476
Welcome_BackgroundColor=normalBackground
Welcome_ButtonBackgroundColor=normalBackground
Welcome_DividerColor=ffd6d6d6
Welcome_Link_BackgroundColor=normalBackground
Welcome_Link_TextColorActive=text
Welcome_Link_TextColorNormal=text
Welcome_ProjectItem_BackgroundColorHover=ffd2d4d6
Welcome_ProjectItem_TextColorFilepath=textDisabled
Welcome_SessionItemExpanded_BackgroundColorHover=hoverBackground
Welcome_SessionItemExpanded_BackgroundColorNormal=selectedBackground
Welcome_SessionItem_BackgroundColorHover=hoverBackground
Welcome_SessionItem_BackgroundColorNormal=normalBackground
Welcome_SideBar_BackgroundColor=normalBackground
Welcome_TextColorHeading=text
Welcome_TextColorNormal=text
Welcome_HoverColor=fff6f6f6
Welcome_LinkColor=ff5caa15
VcsBase_FileStatusUnknown_TextColor=ff000000
VcsBase_FileAdded_TextColor=ff00aa00

View File

@@ -25,12 +25,14 @@
import QtQuick 2.1
import widgets 1.0
import QtQuick.Controls 1.2 as Controls
import QtQuick.Controls 1.0 as Controls
Controls.ScrollView {
id: rectangle1
readonly property int buttonWidth: 190
readonly property int titleY: 50
Item {
id: canvas
@@ -40,90 +42,68 @@ Controls.ScrollView {
Button {
y: screenDependHeightDistance
width: buttonWidth
text: qsTr("New Project")
anchors.left: sessionsTitle.left
onClicked: projectWelcomePage.newProject();
iconSource: "widgets/images/new.png"
iconSource: "image://icons/new/"
+ ((checked || pressed)
? "Welcome_DividerColor"
: "Welcome_ForegroundSecondaryColor")
}
Button {
y: screenDependHeightDistance
width: buttonWidth
text: qsTr("Open Project")
anchors.left: recentProjectsTitle.left
onClicked: projectWelcomePage.openProject();
iconSource: "widgets/images/open.png"
iconSource: "image://icons/open/" +
((checked || pressed)
? "Welcome_DividerColor"
: "Welcome_ForegroundSecondaryColor")
}
NativeText {
id: sessionsTitle
x: 32
y: screenDependHeightDistance + 77
y: screenDependHeightDistance + titleY
color: creatorTheme.Welcome_TextColorHeading
color: creatorTheme.Welcome_TextColor
text: qsTr("Sessions")
font.pixelSize: 16
font.family: "Helvetica"
font.bold: true
}
NativeText {
id: recentProjectsTitle
x: 406
y: screenDependHeightDistance + 77
color: creatorTheme.Welcome_TextColorHeading
y: screenDependHeightDistance + titleY
color: creatorTheme.Welcome_TextColor
text: qsTr("Recent Projects")
anchors.left: sessionsTitle.right
anchors.leftMargin: 280
font.bold: true
font.family: "Helvetica"
font.pixelSize: 16
}
RecentProjects {
x: screenDependLeftMargin
id: recentProjects
anchors.leftMargin: 12
anchors.left: recentProjectsTitle.left
anchors.top: recentProjectsTitle.bottom
anchors.topMargin: 20
model: projectList
}
Item {
id: actions
x: pageCaption.x + pageCaption.textOffset
y: screenDependHeightDistance + 244
width: 140
height: 70
anchors.topMargin: 42
anchors.top: sessions.bottom
}
Sessions {
id: sessions
x: 96
y: 144
width: 274
anchors.leftMargin: 12
anchors.left: sessionsTitle.left
anchors.right: recentProjectsTitle.left
anchors.rightMargin: 40
anchors.top: sessionsTitle.bottom
anchors.topMargin: 20
model: sessionList
}
RecentProjects {
anchors.left: recentProjectsTitle.left
anchors.top: recentProjectsTitle.bottom
anchors.topMargin: 20
model: projectList
}
}
}

View File

@@ -41,7 +41,6 @@ Item {
model: exampleSetModel
textRole: "text"
onCurrentIndexChanged: {
if (comboBox.model === undefined)
return;

View File

@@ -62,6 +62,6 @@ Item {
anchors.right: parent.right
anchors.bottom: parent.bottom
color: creatorTheme.BackgroundColorNormal
color: creatorTheme.Welcome_BackgroundColor
}
}

View File

@@ -38,89 +38,44 @@ Button {
padding.right: 14
background: Item {
anchors.fill: parent
implicitWidth: 160
implicitHeight: 30
Image {
id: icon
x: 11
y: 8
z: 1
x: 4
y: -6
width: 32
height: 32
height: 16
width: 16
source: button.iconSource
visible: button.iconSource != ""
}
implicitWidth: 160
implicitHeight: 30
Rectangle {
id: rectangle
anchors.fill: parent
antialiasing: true
radius: (creatorTheme.WidgetStyle === 'StyleFlat') ? 0 : 3
visible: !(button.pressed || button.checked)
gradient: Gradient {
GradientStop {
position: 0
color: (creatorTheme.WidgetStyle === 'StyleFlat') ? "#232323" : "#f9f9f9"
}
GradientStop {
position: 0.49
color: (creatorTheme.WidgetStyle === 'StyleFlat') ? "#232323" : "#f9f9f9"
}
GradientStop {
position: 0.5
color: (creatorTheme.WidgetStyle === 'StyleFlat') ? "#232323" : "#eeeeee"
}
GradientStop {
position: 1
color: (creatorTheme.WidgetStyle === 'StyleFlat') ? "#232323" : "#eeeeee"
}
}
border.color: creatorTheme.Welcome_Button_BorderColorNormal
}
Rectangle {
anchors.fill: parent
antialiasing: true
radius: (creatorTheme.WidgetStyle === 'StyleFlat') ? 0 : 3
visible: button.pressed || button.checked
gradient: Gradient {
GradientStop {
position: 0.00;
color: (creatorTheme.WidgetStyle === 'StyleFlat') ? "#151515" : "#4c4c4c"
}
GradientStop {
position: 0.49;
color: (creatorTheme.WidgetStyle === 'StyleFlat') ? "#151515" : "#4c4c4c"
}
GradientStop {
position: 0.50;
color: (creatorTheme.WidgetStyle === 'StyleFlat') ? "#151515" : "#424242"
}
GradientStop {
position: 1.00;
color: (creatorTheme.WidgetStyle === 'StyleFlat') ? "#151515" : "#424242"
}
}
border.color: creatorTheme.Welcome_Button_BorderColorPressed
color: (button.checked || button.pressed)
? creatorTheme.Welcome_ForegroundPrimaryColor
: (button.hovered
? creatorTheme.Welcome_HoverColor
: creatorTheme.Welcome_ButtonBackgroundColor)
border.width: 1
border.color: (button.checked || button.pressed)
? creatorTheme.Welcome_ForegroundPrimaryColor
: creatorTheme.Welcome_ForegroundSecondaryColor
radius: (creatorTheme.WidgetStyle === 'StyleFlat') ? 0 : 4
}
}
label: Text {
id: text
renderType: Text.NativeRendering
verticalAlignment: Text.AlignVCenter
text: button.text
color: button.pressed || button.checked
? creatorTheme.Welcome_Button_TextColorPressed
: creatorTheme.Welcome_Button_TextColorNormal
color: (button.checked || button.pressed)
? creatorTheme.Welcome_BackgroundColor
: creatorTheme.Welcome_TextColor
font.pixelSize: 15
font.bold: false
smooth: true

View File

@@ -29,7 +29,7 @@ Rectangle {
id: delegate
height: 240
width: 216
color: creatorTheme.Welcome_BackgroundColorNormal
color: creatorTheme.Welcome_BackgroundColor
property alias caption: captionItem.text
property alias imageSource: imageItem.source
@@ -102,7 +102,7 @@ Rectangle {
y: 161
width: 200
height: 69
color: creatorTheme.Welcome_BackgroundColorNormal
color: creatorTheme.Welcome_BackgroundColor
anchors.bottom: parent.bottom
anchors.right: parent.right
anchors.left: parent.left
@@ -112,7 +112,7 @@ Rectangle {
id: captionItem
x: 16
y: 170
color: creatorTheme.Welcome_Caption_TextColorNormal
color: creatorTheme.Welcome_TextColor
text: qsTr("2D PAINTING EXAMPLE long description")
elide: Text.ElideRight
anchors.right: parent.right
@@ -127,7 +127,7 @@ Rectangle {
NativeText {
id: descriptionItem
height: 43
color: "#7e7e7e"
color: creatorTheme.Welcome_ForegroundPrimaryColor
text: qsTr("The 2D Painting example shows how QPainter and QGLWidget work together.")
anchors.top: captionItem.bottom
anchors.topMargin: 10
@@ -159,7 +159,7 @@ Rectangle {
x: 16
y: 198
text: qsTr("Tags:")
color: creatorTheme.Welcome_TextColorNormal
color: creatorTheme.Welcome_ForegroundSecondaryColor
smooth: true
font.italic: false
font.pixelSize: 11
@@ -187,7 +187,7 @@ Rectangle {
Rectangle {
id: border
color: "#00000000"
radius: 6
radius: creatorTheme.WidgetStyle === 'StyleFlat' ? 0 : 6
anchors.rightMargin: 4
anchors.leftMargin: 4
anchors.bottomMargin: 4
@@ -268,11 +268,6 @@ Rectangle {
target: border
visible: true
}
PropertyChanges {
target: highlight
opacity: 0
}
}
]
@@ -339,25 +334,26 @@ Rectangle {
Repeater {
id: repeater
model: mockupTags
LinkedText {
NativeText {
id: text4
color: "#777777"
text: modelData
smooth: true
font.pixelSize: 11
height: 12
font.family: "Helvetica" //setting the pixelSize will set the family back to the default
font.underline: tagMouseArea.containsMouse
color: creatorTheme.Welcome_LinkColor
wrapMode: Text.WordWrap
onEntered: {
delegate.state="hover"
}
onExited: {
delegate.state=""
}
onClicked: appendTag(modelData)
property bool hugeTag: (text.length > 12) && index > 1
property bool isExampleTag: text === "example"
visible: !hugeTag && !isExampleTag && index < 8 && y < 32
MouseArea {
id: tagMouseArea
anchors.fill: parent
onClicked: appendTag(modelData)
// hoverEnabled: true
cursorShape: Qt.PointingHandCursor
}
}
}
}
@@ -372,6 +368,5 @@ Rectangle {
ListElement {
modelData: "OpenGl"
}
}
}

View File

@@ -25,21 +25,39 @@
import QtQuick 2.1
Row {
Rectangle {
property string iconSource
property string title: "title"
property string openUrl
property string openHelpUrl
spacing: 7
height: 30
width: 231
color: mouseArea.containsMouse
? creatorTheme.Welcome_HoverColor
: creatorTheme.Welcome_BackgroundColor
Image {
id: image
width: 16
height: 16
x: 34
source: iconSource
anchors.verticalCenter: parent.verticalCenter
}
LinkedText {
NativeText {
text: title
anchors.verticalCenter: parent.verticalCenter
anchors.left: image.right
anchors.leftMargin: 8
color: creatorTheme.Welcome_TextColor
font.pixelSize: 11
color: creatorTheme.Welcome_TextColorNormal // 'Qt Account' .. 'User Guide' on lower left
font.underline: mouseArea.containsMouse
}
MouseArea {
id: mouseArea
anchors.fill: parent
hoverEnabled: true
onClicked: {
if (openUrl)
gettingStarted.openUrl(openUrl);
@@ -48,3 +66,4 @@ Row {
}
}
}

View File

@@ -1,51 +0,0 @@
/****************************************************************************
**
** 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
Row {
id: customTab
property alias model: repeater.model
spacing: 24
signal itemChanged
property int currentIndex: 0
onCurrentIndexChanged: welcomeMode.activePlugin = currentIndex
Component.onCompleted: currentIndex = welcomeMode.activePlugin
Repeater {
id: repeater
LinkedText {
text: title
active: customTab.currentIndex === index
onClicked: {
customTab.currentIndex = index
}
}
}
}

View File

@@ -1,106 +0,0 @@
/****************************************************************************
**
** 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
NativeText {
id: root
height: 16
color: active ? creatorTheme.Welcome_Link_TextColorActive
: creatorTheme.Welcome_Link_TextColorNormal
verticalAlignment: Text.AlignVCenter
font: fonts.linkFont
signal clicked
signal entered
signal exited
property bool active: false
property bool hovered: mouseArea.state === "hovered"
onActiveChanged: {
if (active)
mouseArea.state = ""
}
property bool enlargeMouseArea: true
Rectangle {
color: "#909090" // FIXME: theming: Where is this ever visible?
radius: 6
opacity: root.active
z: -1
anchors.rightMargin: -6
anchors.leftMargin: -6
anchors.bottomMargin: -4
anchors.topMargin: -4
anchors.fill: parent
}
Rectangle {
color: "#909090" // FIXME: theming: Where is this ever visible?
opacity: root.active
z: -1
anchors.rightMargin: -6
anchors.leftMargin: -6
anchors.bottomMargin: -4
anchors.topMargin: 10
anchors.fill: parent
}
MouseArea {
id: mouseArea
anchors.fill: parent
anchors.margins: enlargeMouseArea ? -8 : 0
hoverEnabled: true
cursorShape: Qt.PointingHandCursor
onEntered: {
if (!root.active)
mouseArea.state = "hovered"
root.entered();
}
onExited: {
mouseArea.state = ""
root.exited();
}
onClicked: {
root.focus = true;
root.clicked();
}
states: [
State {
name: "hovered"
PropertyChanges {
target: root
font.underline: true
}
}
]
}
Accessible.role: Accessible.Link
}

View File

@@ -1,146 +0,0 @@
/****************************************************************************
**
** 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
Item {
id: tabBar
height: 60
width: parent.width
property alias model: tabs.model
Rectangle {
id: row
width: 100
height: 26
anchors.top: parent.top
anchors.left: parent.left
gradient: Gradient {
GradientStop { position: 0; color: "#f7f7f7" }
GradientStop { position: 1; color: "#e4e4e4" }
}
NativeText {
id: text
horizontalAlignment: Qt.AlignHCenter; verticalAlignment: Qt.AlignVCenter
anchors.fill: parent
text: qsTr("Qt Creator")
}
}
Item {
anchors.top: parent.top
anchors.left: row.right
anchors.right: parent.right
anchors.bottom: row.bottom
Rectangle {
id: left1
anchors.top: parent.top
anchors.left: parent.left
anchors.bottom: parent.bottom
width: 1
gradient: Gradient {
GradientStop { position: 0; color: "#fcfcfc" }
GradientStop { position: 1; color: "#f7f7f7" }
}
}
Rectangle {
id: left2
anchors.top: parent.top
anchors.left: left1.right
anchors.bottom: parent.bottom
width: 1
color: "#313131"
}
Rectangle {
id: bottom1
height: 1
anchors.left: left1.right
anchors.right: parent.right
anchors.bottom: parent.bottom
color: "#fbfbfb"
}
Rectangle {
id: bottom2
height: 1
anchors.left: left2.right
anchors.right: parent.right
anchors.bottom: bottom1.top
width: 1
color: "#313131"
}
Rectangle {
anchors.top: parent.top
anchors.left: left2.right
anchors.right: parent.right
anchors.bottom: bottom2.top
gradient: Gradient {
GradientStop { position: 0.00; color: "#8e8e8e" }
GradientStop { position: 0.07; color: "#8e8e8e" }
GradientStop { position: 0.08; color: "#757575" }
GradientStop { position: 0.40; color: "#666666" }
GradientStop { position: 0.41; color: "#585858" }
GradientStop { position: 1.00; color: "#404040" }
}
}
}
Rectangle {
id: background
anchors.bottom: parent.bottom
width: parent.width
anchors.top: row.bottom
gradient: Gradient {
GradientStop { position: 0; color: "#e4e4e4" }
GradientStop { position: 1; color: "#cecece" }
}
Rectangle {
color: "black"
height: 1
anchors.left: parent.left
anchors.right: parent.right
anchors.bottom: parent.bottom
}
}
Row {
height: background.height
anchors.top: row.bottom
anchors.topMargin: 6
width: parent.width
Repeater {
id: tabs
height: parent.height
model: tabBar.model
delegate: SingleTab { }
}
}
}

View File

@@ -1,54 +0,0 @@
/****************************************************************************
**
** 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
Item {
id: pageCaption
width: 960
height: 40
property int textOffset: captionText.x + captionText.width
property alias caption: captionText.text
NativeText {
id: captionText
y: 9
color: "#515153"
anchors.left: parent.left
anchors.leftMargin: 8
font.pixelSize: 18
font.bold: false
font.family: "Helvetica"
}
Rectangle {
height: 1
color: "#a0a0a0"
anchors.bottomMargin: 8
anchors.bottom: parent.bottom
anchors.left: parent.left
anchors.right: parent.right
}
}

View File

@@ -31,7 +31,6 @@ Rectangle {
property alias model: repeater.model
property int currentIndex: 0
Repeater {
id: repeater
anchors.fill: parent

View File

@@ -25,54 +25,48 @@
import QtQuick 2.1
Item {
Rectangle {
id: projectItem
width: row.width + 8
height: text.height
width: Math.max(projectNameText.width, pathText.width) + projectNameText.x + 11
height: 48
Rectangle { // background shown on hover over project item
anchors.fill: parent
color: creatorTheme.Welcome_ProjectItem_BackgroundColorHover
visible: mouseArea.containsMouse
}
color: mouseArea.containsMouse
? creatorTheme.Welcome_HoverColor
: creatorTheme.Welcome_BackgroundColor
property alias projectName: projectNameText.text
property alias projectPath: pathText.text
Row {
id: row
spacing: 5
Image {
y: 3
source: "images/project.png"
id: icon
x: 11
y: 6
source: "image://icons/project/Welcome_ForegroundSecondaryColor"
}
Column {
id: text
LinkedText {
NativeText {
x: 38
id: projectNameText
height: 20
font.underline: mouseArea.containsMouse
font.pixelSize: fonts.linkFont.pixelSize
font.family: fonts.linkFont.family
enlargeMouseArea: false
font.underline: mouseArea.containsMouse
color: creatorTheme.Welcome_LinkColor
anchors.verticalCenter: icon.verticalCenter
}
NativeText {
id: pathText
height: 20
color: creatorTheme.Welcome_ProjectItem_TextColorFilepath
anchors.left: projectNameText.left
anchors.bottom: projectItem.bottom
anchors.bottomMargin: 6
color: creatorTheme.Welcome_ForegroundPrimaryColor
font: fonts.smallPath
}
}
}
MouseArea {
id: mouseArea
anchors.fill: parent
hoverEnabled: true
cursorShape: Qt.PointingHandCursor
onClicked: projectWelcomePage.requestProject(filePath);
}
}

View File

@@ -30,16 +30,9 @@ Rectangle {
id: projectList
height: column.height + 200
width: column.width
color: creatorTheme.Welcome_BackgroundColorNormal
color: creatorTheme.Welcome_BackgroundColor
property alias model: repeater.model
// Behavior on verticalScrollBar.opacity {
// PropertyAnimation {
// }
// }
// frameVisible: false
Column {
id: column

View File

@@ -31,10 +31,9 @@ Rectangle {
id: searchBar
width: 930
height: 27
color: creatorTheme.Welcome_BackgroundColorNormal
radius: 6
border.color: "#cccccc" // FIXME: make themable
height: 30
color: creatorTheme.Welcome_BackgroundColor
border.color: creatorTheme.Welcome_ForegroundSecondaryColor
property alias placeholderText: lineEdit.placeholderText
property alias text: lineEdit.text
@@ -51,8 +50,8 @@ Rectangle {
font.pixelSize: 14
placeholderText: qsTr("Search...")
style: TextFieldStyle {
placeholderTextColor: creatorTheme.Welcome_TextColorNormal
textColor: creatorTheme.Welcome_TextColorNormal
placeholderTextColor: creatorTheme.Welcome_ForegroundSecondaryColor
textColor: creatorTheme.Welcome_TextColor
background: Item {
}
}

View File

@@ -25,19 +25,18 @@
import QtQuick 2.1
Image {
id: logo
source: "images/qtcreator.png"
NativeText {
y: 21
color: "#424242"
text: "Qt Creator"
font.bold: true
anchors.left: parent.left
anchors.leftMargin: 52
anchors.bottom: parent.bottom
anchors.bottomMargin: 6
font.pixelSize: 16
font.family: "Helvetica"
id: root
signal clicked()
text: qsTr("Clone")
font.pixelSize: 13
font.underline: area.containsMouse
color: creatorTheme.Welcome_LinkColor
MouseArea {
id: area
anchors.fill: parent
hoverEnabled: true
onClicked: root.clicked()
anchors.margins: -6
}
}

View File

@@ -26,49 +26,49 @@
import QtQuick 2.1
Item {
x: 5
id: delegate
property bool expanded: false
height: columns.height
width: columns.width
property alias name: text.text
property alias name: titleText.text
Column {
id: columns
Row {
id: row1
height: text.height
Rectangle {
id: rectangle
height: 30
width: 260
spacing: 7
color: (titleArea.containsMouse || collapseArea.containsMouse || delegate.expanded)
? creatorTheme.Welcome_HoverColor
: creatorTheme.Welcome_BackgroundColor
Image {
source: "images/sessions.png"
anchors.verticalCenter: text.verticalCenter
width: 16
height: 16
id: sessionIcon
source: "image://icons/session/Welcome_ForegroundSecondaryColor"
x: 11
anchors.verticalCenter: parent.verticalCenter
}
LinkedText {
id: text
onClicked: projectWelcomePage.requestSession(sessionName);
width: delegate.ListView.view.width - 80
height: 28
elide: Text.ElideRight
enlargeMouseArea: false
Rectangle {
z: -4
// background of session item
color: creatorTheme.Welcome_SessionItem_BackgroundColorHover
NativeText {
id: titleText
anchors.fill: parent
visible: iArea.containsMouse || text.hovered
anchors.topMargin: 1
anchors.bottomMargin: 1
anchors.leftMargin: -row1.spacing / 2
anchors.leftMargin: 38
elide: Text.ElideRight
color: creatorTheme.Welcome_LinkColor
verticalAlignment: Text.AlignVCenter
font.pixelSize: fonts.linkFont.pixelSize
font.family: fonts.linkFont.family
font.underline: titleArea.containsMouse
}
MouseArea {
id: titleArea
hoverEnabled: true
anchors.fill: parent
onClicked: {
projectWelcomePage.requestSession(sessionName);
}
}
}
@@ -76,10 +76,9 @@ Item {
z: -1
property int margin: 6
id: details
height: expanded ? innerColumn.height + margin * 2 : 0
width: delegate.ListView.view.width - 8 - margin * 2
color: "#f1f1f1"
radius: 4
height: expanded ? innerColumn.height + margin + 16 : 0
width: titleArea.width + collapseArea.width
color: creatorTheme.Welcome_HoverColor
clip: true
visible: false
@@ -89,7 +88,7 @@ Item {
script: if (expanded) details.visible = true;
}
NumberAnimation {
duration: 200
duration: 180
easing.type: Easing.InOutQuad
}
ScriptAction {
@@ -99,45 +98,27 @@ Item {
}
Column {
x: parent.margin + 8
x: titleText.x
y: parent.margin
id: innerColumn
spacing: 12
width: parent.width - 16
Repeater {
model: projectsPath
delegate: Column {
spacing: 4
NativeText {
text: projectsName[index]
font: fonts.boldDescription
color: creatorTheme.Welcome_TextColorNormal
font: fonts.smallPath
color: creatorTheme.Welcome_TextColor
width: titleText.width
}
NativeText {
x: 4
function multiLinePath(path) {
if (path.length < 42)
return path;
var index = 0;
var oldIndex = 0;
while (index != -1 && index < 40) {
oldIndex = index;
index = path.indexOf("/", oldIndex + 1);
if (index == -1)
index = path.indexOf("\\", oldIndex + 1);
}
var newPath = path.substr(0, oldIndex + 1) + "\n"
+ path.substr(oldIndex + 1, path.length - oldIndex - 1);
return newPath;
}
text: multiLinePath(modelData)
text: modelData
font: fonts.smallPath
wrapMode: Text.WrapAnywhere
maximumLineCount: 2
elide: Text.ElideRight
height: lineCount == 2 ? font.pixelSize * 2 + 4 : font.pixelSize + 2
color: creatorTheme.Welcome_ProjectItem_TextColorFilepath
width: delegate.ListView.view.width - 48
color: creatorTheme.Welcome_ForegroundPrimaryColor
width: titleText.width
MouseArea {
anchors.fill: parent
hoverEnabled: true
@@ -147,7 +128,6 @@ Item {
onExited: {
toolTip.hide()
}
}
ToolTip {
x: 10
@@ -160,51 +140,39 @@ Item {
}
Flow {
x: parent.margin
width: parent.width - 2 * parent.margin
height: 18
spacing: 4
spacing: 6
Image { source: "images/icons/clone.png" }
LinkedText {
SessionActionLabel {
text: qsTr("Clone")
onClicked: {
root.model.cloneSession(sessionName);
}
onClicked: root.model.cloneSession(sessionName)
}
Item {
Rectangle {
visible: !defaultSession
width: 16;
height: 10;
width: 1;
height: 13;
color: creatorTheme.Welcome_ForegroundSecondaryColor
}
Image {
visible: !defaultSession
source: "images/icons/rename.png"
}
LinkedText {
SessionActionLabel {
visible: !defaultSession
text: qsTr("Rename")
onClicked: {
root.model.renameSession(sessionName);
}
onClicked: root.model.renameSession(sessionName)
}
Item {
Rectangle {
visible: y === 0 && !defaultSession
width: 16;
height: 10;
width: 1;
height: 13;
color: creatorTheme.Welcome_ForegroundSecondaryColor
}
Image {
visible: !defaultSession
source: "images/icons/delete.png"
}
LinkedText {
SessionActionLabel {
visible: !defaultSession
text: qsTr("Delete")
onClicked: {
root.model.deleteSession(sessionName);
}
onClicked: root.model.deleteSession(sessionName)
}
}
}
@@ -212,47 +180,27 @@ Item {
}
Item {
x: delegate.ListView.view.width - 65
width: 38
height: text.height
Item {
x: rectangle.width
width: 28
height: titleArea.height
Rectangle {
id: collapseButton
visible: text.hovered || iArea.containsMouse || delegate.expanded
property color color: iArea.containsMouse ? creatorTheme.Welcome_SessionItemExpanded_BackgroundColorHover
: creatorTheme.Welcome_SessionItemExpanded_BackgroundColorNormal
anchors.fill: parent
color: (collapseArea.containsMouse || delegate.expanded)
? creatorTheme.Welcome_HoverColor
: creatorTheme.Welcome_BackgroundColor
Image {
x: 4
x: 6
y: 7
source: "images/info.png"
}
Image {
x: 20
y: 7
source: delegate.expanded ? "images/arrow_up.png" : "images/arrow_down.png"
}
Rectangle {
color: collapseButton.color
z: -1
radius: creatorTheme.WidgetStyle === 'StyleFlat' ? 0 : 6
anchors.fill: parent
anchors.topMargin: 1
anchors.bottomMargin: 1
}
Rectangle {
color: collapseButton.color
z: -1
anchors.fill: parent
anchors.topMargin: 6
visible: details.visible
visible: (collapseArea.containsMouse || delegate.expanded || titleArea.containsMouse)
source: "image://icons/expandarrow/Welcome_ForegroundSecondaryColor"
rotation: delegate.expanded ? 180 : 0
}
}
MouseArea {
id: iArea
id: collapseArea
anchors.fill: parent
hoverEnabled: true
onClicked: {

View File

@@ -26,18 +26,17 @@
import QtQuick 2.1
import widgets 1.0
Item {
Rectangle {
id: root
property var model
property int topMargin: 6
height: content.contentHeight + 200
color: creatorTheme.Welcome_BackgroundColor
ListView {
id: content
model: root.model
anchors.fill: parent
anchors.topMargin: topMargin
snapMode: ListView.SnapToItem
clip: true
interactive: false

View File

@@ -35,115 +35,70 @@ ColumnLayout {
property alias currentIndex: tabs.currentIndex
property alias model: tabs.model
readonly property int lrPadding: 34
Item {
id: modeArea
z: 1
Layout.fillWidth: true
Layout.preferredWidth: tabs.width + 16 * 2
Layout.preferredWidth: tabs.width + lrPadding * 2
Layout.preferredHeight: tabs.height + screenDependHeightDistance * 2
Component {
id: imageBackground
Image {
fillMode: Image.Tile
source: "images/background.png"
anchors.fill: parent
}
}
Component {
id: flatBackground
Rectangle {
color: creatorTheme.Welcome_SideBar_BackgroundColor
}
}
Loader {
id: topLeftLoader
color: creatorTheme.Welcome_BackgroundColor
anchors.fill: parent
sourceComponent: creatorTheme.WidgetStyle === 'StyleFlat' ? flatBackground : imageBackground;
}
Tabs {
anchors.verticalCenter: parent.verticalCenter
x: 16
width: Math.max(modeArea.width - 16 * 2, implicitWidth)
x: lrPadding
width: Math.max(modeArea.width - lrPadding * 2, implicitWidth)
id: tabs
spacing: Math.round((screenDependHeightDistance / count) + 10)
}
Rectangle {
color: creatorTheme.WidgetStyle === 'StyleFlat' ?
creatorTheme.Welcome_SideBar_BackgroundColor : creatorTheme.Welcome_DividerColor
anchors.left: parent.left
anchors.right: parent.right
anchors.bottom: parent.bottom
anchors.bottomMargin: 0
height: 1
}
Rectangle {
color: creatorTheme.WidgetStyle === 'StyleFlat' ?
creatorTheme.Welcome_SideBar_BackgroundColor : creatorTheme.Welcome_DividerColor
anchors.left: parent.left
anchors.right: parent.right
anchors.bottom: parent.bottom
anchors.bottomMargin: -1
height: 1
opacity: 0.6
}
Rectangle {
color: creatorTheme.WidgetStyle === 'StyleFlat' ?
creatorTheme.Welcome_SideBar_BackgroundColor : creatorTheme.Welcome_DividerColor
anchors.left: parent.left
anchors.right: parent.right
anchors.bottom: parent.bottom
anchors.bottomMargin: -2
height: 1
opacity: 0.2
}
}
Rectangle {
color: creatorTheme.Welcome_SideBar_BackgroundColor
color: creatorTheme.Welcome_BackgroundColor
Layout.fillWidth: true
Layout.preferredWidth: innerColumn.width + 20
Layout.preferredWidth: upperColumn.width + 20
Layout.fillHeight: true
ColumnLayout {
id: innerColumn
id: upperColumn
x: 12
x: lrPadding
spacing: 4
spacing: 8
property int spacerHeight: screenDependHeightDistance - 14
property int spacerHeight: screenDependHeightDistance
Item {
Layout.preferredHeight: innerColumn.spacerHeight
Layout.preferredHeight: upperColumn.spacerHeight
}
NativeText {
text: qsTr("New to Qt?")
color: creatorTheme.Welcome_TextColorNormal
color: creatorTheme.Welcome_TextColor
font.pixelSize: 18
}
NativeText {
id: gettingStartedText
Layout.preferredWidth: innerColumn.width
Layout.preferredWidth: upperColumn.width
text: qsTr("Learn how to develop your own applications and explore Qt Creator.")
color: creatorTheme.Welcome_TextColorNormal
color: creatorTheme.Welcome_ForegroundPrimaryColor
font.pixelSize: 12
wrapMode: Text.WrapAtWordBoundaryOrAnywhere
}
Item {
Layout.preferredHeight: innerColumn.spacerHeight
Layout.preferredHeight: 4
}
Button {
@@ -156,38 +111,34 @@ ColumnLayout {
}
Item {
Layout.preferredHeight: innerColumn.spacerHeight
Layout.preferredHeight: upperColumn.spacerHeight * 2
}
}
ColumnLayout {
spacing: 16
anchors.top: upperColumn.bottom
anchors.topMargin: 8
IconAndLink {
iconSource: "images/icons/qt_account.png"
iconSource: "image://icons/qtaccount"
title: qsTr("Qt Account")
openUrl: "https://account.qt.io"
}
IconAndLink {
iconSource: "images/icons/qt_cloud.png"
title: qsTr("Qt Cloud Services")
openUrl: "https://developer.qtcloudservices.com"
}
IconAndLink {
iconSource: "images/icons/onlineCommunity.png"
iconSource: "image://icons/community"
title: qsTr("Online Community")
openUrl: "http://forum.qt.io"
}
IconAndLink {
iconSource: "images/icons/blogs.png"
iconSource: "image://icons/blogs"
title: qsTr("Blogs")
openUrl: "http://planet.qt.io"
}
IconAndLink {
iconSource: "images/icons/userGuide.png"
iconSource: "image://icons/userguide"
title: qsTr("User Guide")
openHelpUrl: "qthelp://org.qt-project.qtcreator/doc/index.html"
}
}
}
}
}

View File

@@ -78,25 +78,15 @@ Item {
Rectangle {
anchors.fill: parent
color: creatorTheme.Welcome_BackgroundColor
border.width: 1
smooth: true
radius: 2
gradient: Gradient {
GradientStop {
position: 0.00;
color: "#ffffff";
}
GradientStop {
position: 1.00;
color: "#e4e5f0";
}
}
border.color: creatorTheme.Welcome_ForegroundSecondaryColor
}
NativeText {
x: toolTip.margin
y: toolTip.margin
id: text
color: creatorTheme.Welcome_TextColor
}
}

Binary file not shown.

Before

Width:  |  Height:  |  Size: 213 B

Binary file not shown.

Before

Width:  |  Height:  |  Size: 148 B

Binary file not shown.

Before

Width:  |  Height:  |  Size: 174 B

Binary file not shown.

Before

Width:  |  Height:  |  Size: 146 B

Binary file not shown.

Before

Width:  |  Height:  |  Size: 174 B

Binary file not shown.

Before

Width:  |  Height:  |  Size: 142 B

Binary file not shown.

Before

Width:  |  Height:  |  Size: 88 B

Binary file not shown.

Before

Width:  |  Height:  |  Size: 1.6 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 207 B

Binary file not shown.

Before

Width:  |  Height:  |  Size: 306 B

Binary file not shown.

Before

Width:  |  Height:  |  Size: 243 B

Binary file not shown.

Before

Width:  |  Height:  |  Size: 367 B

Binary file not shown.

Before

Width:  |  Height:  |  Size: 1.1 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 540 B

Binary file not shown.

Before

Width:  |  Height:  |  Size: 527 B

Binary file not shown.

Before

Width:  |  Height:  |  Size: 288 B

Binary file not shown.

Before

Width:  |  Height:  |  Size: 462 B

Binary file not shown.

Before

Width:  |  Height:  |  Size: 1.5 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 206 B

Binary file not shown.

Before

Width:  |  Height:  |  Size: 304 B

Binary file not shown.

Before

Width:  |  Height:  |  Size: 198 B

Binary file not shown.

Before

Width:  |  Height:  |  Size: 4.6 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 3.1 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 662 B

Binary file not shown.

Before

Width:  |  Height:  |  Size: 1.4 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 1.9 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 1.6 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 200 B

View File

@@ -151,8 +151,8 @@ int TimelineModel::row(int index) const
return expanded() ? expandedRow(index) : collapsedRow(index);
}
TimelineModel::TimelineModelPrivate::TimelineModelPrivate(int modelId, const QString &displayName) :
modelId(modelId), displayName(displayName), expanded(false), hidden(false),
TimelineModel::TimelineModelPrivate::TimelineModelPrivate(int modelId) :
modelId(modelId), expanded(false), hidden(false),
expandedRowCount(1), collapsedRowCount(1), q_ptr(0)
{
}
@@ -163,8 +163,8 @@ TimelineModel::TimelineModel(TimelineModelPrivate &dd, QObject *parent) :
d_ptr->q_ptr = this;
}
TimelineModel::TimelineModel(int modelId, const QString &displayName, QObject *parent) :
QObject(parent), d_ptr(new TimelineModelPrivate(modelId, displayName))
TimelineModel::TimelineModel(int modelId, QObject *parent) :
QObject(parent), d_ptr(new TimelineModelPrivate(modelId))
{
d_ptr->q_ptr = this;
}
@@ -512,6 +512,15 @@ void TimelineModel::setHidden(bool hidden)
}
}
void TimelineModel::setDisplayName(const QString &displayName)
{
Q_D(TimelineModel);
if (d->displayName != displayName) {
d->displayName = displayName;
emit displayNameChanged();
}
}
QString TimelineModel::displayName() const
{
Q_D(const TimelineModel);

View File

@@ -37,7 +37,7 @@ class TIMELINE_EXPORT TimelineModel : public QObject
{
Q_OBJECT
Q_PROPERTY(int modelId READ modelId CONSTANT)
Q_PROPERTY(QString displayName READ displayName CONSTANT)
Q_PROPERTY(QString displayName READ displayName WRITE setDisplayName NOTIFY displayNameChanged)
Q_PROPERTY(bool empty READ isEmpty NOTIFY emptyChanged)
Q_PROPERTY(bool hidden READ hidden WRITE setHidden NOTIFY hiddenChanged)
Q_PROPERTY(bool expanded READ expanded WRITE setExpanded NOTIFY expandedChanged)
@@ -52,7 +52,7 @@ class TIMELINE_EXPORT TimelineModel : public QObject
public:
class TimelineModelPrivate;
TimelineModel(int modelId, const QString &displayName, QObject *parent = 0);
TimelineModel(int modelId, QObject *parent = 0);
~TimelineModel();
// Methods implemented by the abstract model itself
@@ -82,6 +82,7 @@ public:
bool hidden() const;
void setExpanded(bool expanded);
void setHidden(bool hidden);
void setDisplayName(const QString &displayName);
QString displayName() const;
int expandedRowCount() const;
int collapsedRowCount() const;
@@ -123,6 +124,7 @@ signals:
void collapsedRowCountChanged();
void rowCountChanged();
void labelsChanged();
void displayNameChanged();
protected:
QColor colorBySelectionId(int index) const;

View File

@@ -64,7 +64,7 @@ public:
inline qint64 timestamp() const {return end;}
};
TimelineModelPrivate(int modelId, const QString &displayName);
TimelineModelPrivate(int modelId);
void init(TimelineModel *q);
int firstIndexNoParents(qint64 startTime) const;
@@ -131,7 +131,7 @@ public:
QVector<int> rowOffsets;
const int modelId;
const QString displayName;
QString displayName;
bool expanded;
bool hidden;

View File

@@ -25,6 +25,7 @@
#include "stylehelper.h"
#include "theme/theme.h"
#include "hostosinfo.h"
#include <QPixmapCache>
@@ -108,11 +109,6 @@ QColor StyleHelper::baseColor(bool lightColored)
return m_baseColor.lighter(230);
}
bool StyleHelper::isBaseColorDefault()
{
return m_requestedBaseColor == DEFAULT_BASE_COLOR;
}
QColor StyleHelper::highlightColor(bool lightColored)
{
QColor result = baseColor(lightColored);
@@ -152,10 +148,20 @@ void StyleHelper::setBaseColor(const QColor &newcolor)
{
m_requestedBaseColor = newcolor;
const QColor themeBaseColor = creatorTheme()->color(Theme::PanelStatusBarBackgroundColor);
const QColor defaultBaseColor = QColor(DEFAULT_BASE_COLOR);
QColor color;
if (defaultBaseColor == newcolor) {
color = themeBaseColor;
} else {
const int valueDelta = (newcolor.value() - defaultBaseColor.value()) / 3;
const int value = qBound(0, themeBaseColor.value() + valueDelta, 255);
color.setHsv(newcolor.hue(),
newcolor.saturation() * 0.7,
64 + newcolor.value() / 3);
value);
}
if (color.isValid() && color != m_baseColor) {
m_baseColor = color;

View File

@@ -56,7 +56,6 @@ public:
// This is our color table, all colors derive from baseColor
static QColor requestedBaseColor() { return m_requestedBaseColor; }
static QColor baseColor(bool lightColored = false);
static bool isBaseColorDefault();
static QColor panelTextColor(bool lightColored = false);
static QColor highlightColor(bool lightColored = false);
static QColor shadowColor(bool lightColored = false);

View File

@@ -103,7 +103,6 @@ public:
OutputPaneButtonFlashColor,
OutputPaneToggleButtonTextColorChecked,
OutputPaneToggleButtonTextColorUnchecked,
PanelButtonToolBackgroundColorHover,
PanelStatusBarBackgroundColor,
PanelsWidgetSeparatorLineColor,
PanelTextColorDark,
@@ -113,6 +112,7 @@ public:
ProgressBarColorFinished,
ProgressBarColorNormal,
ProgressBarTitleColor,
ProgressBarBackgroundColor,
SplitterColor,
TextColorDisabled,
TextColorError,
@@ -160,6 +160,14 @@ public:
OutputPanes_StdErrTextColor,
OutputPanes_StdOutTextColor,
OutputPanes_WarningMessageTextColor,
OutputPanes_TestPassTextColor,
OutputPanes_TestFailTextColor,
OutputPanes_TestXFailTextColor,
OutputPanes_TestXPassTextColor,
OutputPanes_TestSkipTextColor,
OutputPanes_TestWarnTextColor,
OutputPanes_TestFatalTextColor,
OutputPanes_TestDebugTextColor,
/* Debugger Log Window */
@@ -175,27 +183,14 @@ public:
/* Welcome Plugin */
Welcome_TextColorNormal,
Welcome_TextColorHeading, // #535353 // Sessions, Recent Projects
Welcome_BackgroundColorNormal, // #ffffff
Welcome_DividerColor, // #737373
Welcome_Button_BorderColorNormal,
Welcome_Button_BorderColorPressed,
Welcome_Button_TextColorNormal,
Welcome_Button_TextColorPressed,
Welcome_Link_TextColorNormal,
Welcome_Link_TextColorActive,
Welcome_Link_BackgroundColor,
Welcome_Caption_TextColorNormal,
Welcome_SideBar_BackgroundColor,
Welcome_ProjectItem_TextColorFilepath,
Welcome_ProjectItem_BackgroundColorHover,
Welcome_SessionItem_BackgroundColorNormal,
Welcome_SessionItem_BackgroundColorHover,
Welcome_SessionItemExpanded_BackgroundColorNormal,
Welcome_SessionItemExpanded_BackgroundColorHover,
Welcome_TextColor,
Welcome_ForegroundPrimaryColor,
Welcome_ForegroundSecondaryColor,
Welcome_BackgroundColor,
Welcome_ButtonBackgroundColor,
Welcome_DividerColor,
Welcome_LinkColor,
Welcome_HoverColor,
/* VcsBase Plugin */
VcsBase_FileStatusUnknown_TextColor,

View File

@@ -32,7 +32,7 @@ namespace Utils {
namespace Icons {
const Utils::Icon EDIT_CLEAR({
{QLatin1String(":/core/images/editclear.png"), Utils::Theme::BackgroundColorHover}}, Utils::Icon::Tint);
{QLatin1String(":/core/images/editclear.png"), Utils::Theme::PanelTextColorMid}}, Utils::Icon::Tint);
} // namespace Icons
} // namespace Utils

View File

@@ -62,6 +62,7 @@ public:
virtual ~TestCodeParser();
void setState(State state);
State state() const { return m_parserState; }
bool isParsing() const { return m_parserState == PartialParse || m_parserState == FullParse; }
void setDirty() { m_dirty = true; }
#ifdef WITH_TESTS
bool furtherParsingExpected() const

View File

@@ -25,6 +25,8 @@
#include "testresult.h"
#include <utils/theme/theme.h>
namespace Autotest {
namespace Internal {
@@ -119,29 +121,28 @@ QColor TestResult::colorForType(const Result::Type type)
if (type >= Result::INTERNAL_MESSAGES_BEGIN && type <= Result::INTERNAL_MESSAGES_END)
return QColor("transparent");
Utils::Theme *creatorTheme = Utils::creatorTheme();
switch (type) {
case Result::Pass:
return QColor("#009900");
return creatorTheme->color(Utils::Theme::OutputPanes_TestPassTextColor);
case Result::Fail:
return QColor("#a00000");
return creatorTheme->color(Utils::Theme::OutputPanes_TestFailTextColor);
case Result::ExpectedFail:
return QColor("#00ff00");
return creatorTheme->color(Utils::Theme::OutputPanes_TestXFailTextColor);
case Result::UnexpectedPass:
return QColor("#ff0000");
return creatorTheme->color(Utils::Theme::OutputPanes_TestXPassTextColor);
case Result::Skip:
return QColor("#787878");
case Result::BlacklistedPass:
return QColor(0, 0, 0);
case Result::BlacklistedFail:
return QColor(0, 0, 0);
return creatorTheme->color(Utils::Theme::OutputPanes_TestSkipTextColor);
case Result::MessageDebug:
return QColor("#329696");
return creatorTheme->color(Utils::Theme::OutputPanes_TestDebugTextColor);
case Result::MessageWarn:
return QColor("#d0bb00");
return creatorTheme->color(Utils::Theme::OutputPanes_TestWarnTextColor);
case Result::MessageFatal:
return QColor("#640000");
return creatorTheme->color(Utils::Theme::OutputPanes_TestFatalTextColor);
case Result::BlacklistedPass:
case Result::BlacklistedFail:
default:
return QColor("#000000");
return creatorTheme->color(Utils::Theme::OutputPanes_StdOutTextColor);
}
}

View File

@@ -31,6 +31,7 @@
#include "testrunner.h"
#include "testsettings.h"
#include "testtreemodel.h"
#include "testcodeparser.h"
#include <coreplugin/coreconstants.h>
#include <coreplugin/coreicons.h>
@@ -517,7 +518,8 @@ void TestResultsPane::onScrollBarRangeChanged(int, int max)
void TestResultsPane::updateRunActions()
{
QString whyNot;
const bool enable = TestTreeModel::instance()->hasTests()
TestTreeModel *model = TestTreeModel::instance();
const bool enable = !model->parser()->isParsing() && model->hasTests()
&& ProjectExplorer::ProjectExplorerPlugin::canRunStartupProject(
ProjectExplorer::Constants::NORMAL_RUN_MODE, &whyNot);
m_runAll->setEnabled(enable);

View File

@@ -6,14 +6,10 @@ CppApplication {
Depends { name: "cpp" }
Depends { name: "Qt.core" }
Depends {
condition: Qt.core.versionMajor > 4
name: "Qt.qmltest"
}
Depends { name: "Qt.qmltest" }
Group {
name: "main application"
condition: Qt.core.versionMajor > 4
files: [ "main.cpp" ]
}

View File

@@ -6,14 +6,11 @@ CppApplication {
Depends { name: "cpp" }
Depends { name: "Qt.core" }
Depends {
condition: Qt.core.versionMajor > 4
name: "Qt.qmltest"
}
Depends { name: "Qt.qmltest" }
Group {
condition: Qt.core.versionMajor > 4
name: "main application"
files: [ "main.cpp" ]
}

View File

@@ -29,8 +29,8 @@
#include "autotoolsproject.h"
#include "autotoolsprojectconstants.h"
using namespace AutotoolsProjectManager;
using namespace AutotoolsProjectManager::Internal;
namespace AutotoolsProjectManager {
namespace Internal {
AutotoolsProjectFile::AutotoolsProjectFile(const QString &fileName)
{
@@ -39,30 +39,5 @@ AutotoolsProjectFile::AutotoolsProjectFile(const QString &fileName)
setFilePath(Utils::FileName::fromString(fileName));
}
bool AutotoolsProjectFile::save(QString *errorString, const QString &fileName, bool autoSave)
{
Q_UNUSED(errorString);
Q_UNUSED(fileName);
Q_UNUSED(autoSave);
return false;
}
bool AutotoolsProjectFile::isModified() const
{
return false;
}
bool AutotoolsProjectFile::isSaveAsAllowed() const
{
return false;
}
bool AutotoolsProjectFile::reload(QString *errorString, ReloadFlag flag, ChangeType type)
{
Q_UNUSED(errorString);
Q_UNUSED(flag);
Q_UNUSED(type);
return false;
}
} // namespace Internal
} // namespace AutotoolsProjectManager

View File

@@ -32,8 +32,6 @@
namespace AutotoolsProjectManager {
namespace Internal {
class AutotoolsProject;
/**
* @brief Implementation of the Core::IDocument interface.
*
@@ -47,14 +45,8 @@ class AutotoolsProject;
class AutotoolsProjectFile : public Core::IDocument
{
Q_OBJECT
public:
AutotoolsProjectFile(const QString &fileName);
bool save(QString *errorString, const QString &fileName, bool autoSave) override;
bool isModified() const override;
bool isSaveAsAllowed() const override;
bool reload(QString *errorString, ReloadFlag flag, ChangeType type) override;
};
} // namespace Internal

View File

@@ -60,8 +60,8 @@
namespace CMakeProjectManager {
namespace Internal {
static QStringList toArguments(const CMakeConfig &config) {
return Utils::transform(config, [](const CMakeConfigItem &i) -> QString {
static QStringList toArguments(const CMakeConfig &config, const ProjectExplorer::Kit *k) {
return Utils::transform(config, [k](const CMakeConfigItem &i) -> QString {
QString a = QString::fromLatin1("-D");
a.append(QString::fromUtf8(i.key));
switch (i.type) {
@@ -81,7 +81,7 @@ static QStringList toArguments(const CMakeConfig &config) {
a.append(QLatin1String(":INTERNAL="));
break;
}
a.append(QString::fromUtf8(i.value));
a.append(QString::fromUtf8(k->macroExpander()->expand(i.value)));
return a;
});
@@ -110,6 +110,7 @@ BuildDirManager::BuildDirManager(const CMakeBuildConfiguration *bc) :
BuildDirManager::~BuildDirManager()
{
stopProcess();
resetData();
delete m_tempDir;
}
@@ -153,6 +154,9 @@ bool BuildDirManager::isParsing() const
void BuildDirManager::forceReparse()
{
if (m_buildConfiguration->target()->activeBuildConfiguration() != m_buildConfiguration)
return;
stopProcess();
CMakeTool *tool = CMakeKitInformation::cmakeTool(kit());
@@ -424,11 +428,11 @@ void BuildDirManager::startCMake(CMakeTool *tool, const QString &generator,
Utils::QtcProcess::addArg(&args, srcDir);
if (!generator.isEmpty())
Utils::QtcProcess::addArg(&args, QString::fromLatin1("-G%1").arg(generator));
Utils::QtcProcess::addArgs(&args, toArguments(config));
Utils::QtcProcess::addArgs(&args, toArguments(config, kit()));
ProjectExplorer::TaskHub::clearTasks(ProjectExplorer::Constants::TASK_CATEGORY_BUILDSYSTEM);
Core::MessageManager::write(tr("Running '%1 %2' in %3.")
Core::MessageManager::write(tr("Running \"%1 %2\" in %3.")
.arg(tool->cmakeExecutable().toUserOutput())
.arg(args)
.arg(workDirectory().toUserOutput()));

View File

@@ -266,12 +266,14 @@ bool CMakeBuildStep::immutable() const
void CMakeBuildStep::stdOutput(const QString &line)
{
if (m_percentProgress.indexIn(line) != -1) {
AbstractProcessStep::stdOutput(line);
bool ok = false;
int percent = m_percentProgress.cap(1).toInt(&ok);
if (ok)
futureInterface()->setProgressValue(percent);
return;
} else if (m_ninjaProgress.indexIn(line) != -1) {
AbstractProcessStep::stdOutput(line);
m_useNinja = true;
bool ok = false;
int done = m_ninjaProgress.cap(1).toInt(&ok);

View File

@@ -41,26 +41,6 @@ CMakeFile::CMakeFile(const FileName &fileName)
setFilePath(fileName);
}
bool CMakeFile::save(QString *errorString, const QString &fileName, bool autoSave)
{
// Once we have an texteditor open for this file, we probably do
// need to implement this, don't we.
Q_UNUSED(errorString)
Q_UNUSED(fileName)
Q_UNUSED(autoSave)
return false;
}
bool CMakeFile::isModified() const
{
return false;
}
bool CMakeFile::isSaveAsAllowed() const
{
return false;
}
Core::IDocument::ReloadBehavior CMakeFile::reloadBehavior(ChangeTrigger state, ChangeType type) const
{
Q_UNUSED(state)
@@ -68,12 +48,5 @@ Core::IDocument::ReloadBehavior CMakeFile::reloadBehavior(ChangeTrigger state, C
return BehaviorSilent;
}
bool CMakeFile::reload(QString *errorString, ReloadFlag flag, ChangeType type)
{
Q_UNUSED(errorString)
Q_UNUSED(flag)
Q_UNUSED(type)
return true;
}
} // namespace Internal
} // namespace CMakeProjectManager

View File

@@ -38,13 +38,7 @@ class CMakeFile : public Core::IDocument
public:
CMakeFile(const Utils::FileName &fileName);
bool save(QString *errorString, const QString &fileName, bool autoSave) override;
bool isModified() const override;
bool isSaveAsAllowed() const override;
ReloadBehavior reloadBehavior(ChangeTrigger state, ChangeType type) const override;
bool reload(QString *errorString, ReloadFlag flag, ChangeType type) override;
};
} // namespace Internal

View File

@@ -325,14 +325,12 @@ void CMakeConfigurationKitInformation::fromStringList(Kit *k, const QStringList
QVariant CMakeConfigurationKitInformation::defaultValue(const Kit *k) const
{
Q_UNUSED(k);
// FIXME: Convert preload scripts
CMakeConfig config;
const QtSupport::BaseQtVersion *const version = QtSupport::QtKitInformation::qtVersion(k);
if (version && version->isValid())
config << CMakeConfigItem(CMAKE_QMAKE_KEY, version->qmakeCommand().toString().toUtf8());
const ToolChain *const tc = ToolChainKitInformation::toolChain(k);
if (tc && tc->isValid())
config << CMakeConfigItem(CMAKE_TOOLCHAIN_KEY, tc->compilerCommand().toString().toUtf8());
config << CMakeConfigItem(CMAKE_QMAKE_KEY, "%{Qt:qmakeExecutable}");
config << CMakeConfigItem(CMAKE_TOOLCHAIN_KEY, "%{Compiler:Executable}");
const QStringList tmp
= Utils::transform(config, [](const CMakeConfigItem &i) { return i.toString(); });
@@ -348,10 +346,12 @@ QList<Task> CMakeConfigurationKitInformation::validate(const Kit *k) const
QByteArray qmakePath;
QByteArray tcPath;
foreach (const CMakeConfigItem &i, config) {
// Do not use expand(QByteArray) as we can not be sure the input is latin1
const QByteArray expandedValue = k->macroExpander()->expand(QString::fromUtf8(i.value)).toUtf8();
if (i.key == CMAKE_QMAKE_KEY)
qmakePath = i.value;
qmakePath = expandedValue;
else if (i.key == CMAKE_TOOLCHAIN_KEY)
tcPath = i.value;
tcPath = expandedValue;
}
QList<Task> result;
@@ -406,31 +406,7 @@ void CMakeConfigurationKitInformation::setup(Kit *k)
void CMakeConfigurationKitInformation::fix(Kit *k)
{
const QtSupport::BaseQtVersion *const version = QtSupport::QtKitInformation::qtVersion(k);
const QByteArray qmakePath
= (version && version->isValid()) ? version->qmakeCommand().toString().toUtf8() : QByteArray();
const ToolChain *const tc = ToolChainKitInformation::toolChain(k);
const QByteArray tcPath
= (tc && tc->isValid()) ? tc->compilerCommand().toString().toUtf8() : QByteArray();
CMakeConfig result;
bool haveQmake = false;
bool haveToolChain = false;
foreach (const CMakeConfigItem &i, configuration(k)) {
if (i.key == CMAKE_QMAKE_KEY)
haveQmake = true;
else if (i.key == CMAKE_TOOLCHAIN_KEY)
haveToolChain = true;
result << i;
}
if (!haveQmake && !qmakePath.isEmpty())
result << CMakeConfigItem(CMAKE_QMAKE_KEY, qmakePath);
if (!haveToolChain && !tcPath.isEmpty())
result << CMakeConfigItem(CMAKE_TOOLCHAIN_KEY, tcPath);
setConfiguration(k, result);
Q_UNUSED(k);
}
KitInformation::ItemList CMakeConfigurationKitInformation::toUserOutput(const Kit *k) const

View File

@@ -117,7 +117,6 @@ void CMakeManager::clearCMakeCache(Project *project)
if (!bc)
return;
bc->setCMakeConfiguration(CMakeConfigurationKitInformation::configuration(bc->target()->kit()));
bc->buildDirManager()->clearCache();
}

View File

@@ -198,6 +198,7 @@ const char SETTINGS_ID_MIMETYPES[] = "E.MimeTypes";
const char SETTINGS_DEFAULTTEXTENCODING[] = "General/DefaultFileEncoding";
const char SETTINGS_THEME[] = "Core/CreatorTheme";
const char DEFAULT_THEME[] = "default";
const char ALL_FILES_FILTER[] = QT_TRANSLATE_NOOP("Core", "All Files (*)");

View File

@@ -84,7 +84,7 @@ const Icon NEXT({
const Icon PREV({
{QLatin1String(":/core/images/prev.png"), Theme::IconsNavigationArrowsColor}});
const Icon MAGNIFIER({
{QLatin1String(":/core/images/magnifier.png"), Theme::BackgroundColorHover}}, Icon::Tint);
{QLatin1String(":/core/images/magnifier.png"), Theme::PanelTextColorMid}}, Icon::Tint);
const Icon CLEAN_PANE({
{QLatin1String(":/core/images/clean_pane_small.png"), Theme::IconsBaseColor}});
const Icon RELOAD({

View File

@@ -96,7 +96,7 @@ CorePlugin::~CorePlugin()
void CorePlugin::parseArguments(const QStringList &arguments)
{
const Id settingsThemeId = Id::fromSetting(ICore::settings()->value(
QLatin1String(Constants::SETTINGS_THEME), QLatin1String("default")));
QLatin1String(Constants::SETTINGS_THEME), QLatin1String(Constants::DEFAULT_THEME)));
Id themeId = settingsThemeId;
QColor overrideColor;
bool presentationMode = false;

View File

@@ -109,15 +109,6 @@ private:
QHash<QString, DocumentModel::Entry *> m_entryByFixedPath;
};
class SuspendedDocument : public IDocument
{
public:
bool save(QString *, const QString &, bool) override { return false; }
bool isModified() const override { return false; }
bool isSaveAsAllowed() const override { return false; }
bool reload(QString *, ReloadFlag, ChangeType) override { return true; }
};
DocumentModelPrivate::DocumentModelPrivate() :
m_lockedIcon(Icons::LOCKED.icon()),
m_unlockedIcon(Icons::UNLOCKED.icon())
@@ -226,7 +217,7 @@ void DocumentModel::addEditor(IEditor *editor, bool *isNewDocument)
void DocumentModel::addSuspendedDocument(const QString &fileName, const QString &displayName, Id id)
{
Entry *entry = new Entry;
entry->document = new SuspendedDocument;
entry->document = new IDocument;
entry->document->setFilePath(Utils::FileName::fromString(fileName));
entry->document->setPreferredDisplayName(displayName);
entry->document->setId(id);

View File

@@ -272,9 +272,7 @@ void FancyActionBar::paintEvent(QPaintEvent *event)
if (creatorTheme()->widgetStyle () == Theme::StyleFlat) {
// this paints the background of the bottom portion of the
// left tab bar
painter.fillRect(event->rect(), StyleHelper::isBaseColorDefault()
? creatorTheme()->color(Theme::FancyTabBarBackgroundColor)
: StyleHelper::baseColor());
painter.fillRect(event->rect(), StyleHelper::baseColor());
painter.setPen(creatorTheme()->color(Theme::FancyToolBarSeparatorColor));
painter.drawLine(borderRect.topLeft(), borderRect.topRight());
} else {

View File

@@ -33,7 +33,6 @@
#include <QDebug>
#include <QColorDialog>
#include <QHBoxLayout>
#include <QVBoxLayout>
#include <QMouseEvent>
@@ -119,9 +118,7 @@ void FancyTabBar::paintEvent(QPaintEvent *event)
if (creatorTheme()->widgetStyle() == Theme::StyleFlat) {
// draw background of upper part of left tab widget
// (Welcome, ... Help)
p.fillRect(event->rect(), StyleHelper::isBaseColorDefault()
? creatorTheme()->color(Theme::FancyTabBarBackgroundColor)
: StyleHelper::baseColor());
p.fillRect(event->rect(), StyleHelper::baseColor());
}
for (int i = 0; i < count(); ++i)
@@ -329,7 +326,7 @@ void FancyTabBar::paintTab(QPainter *painter, int tabIndex) const
painter->restore();
}
if (!enabled)
if (!enabled && creatorTheme()->widgetStyle() == Theme::StyleDefault)
painter->setOpacity(0.7);
if (drawIcon) {
@@ -393,23 +390,22 @@ bool FancyTabBar::isTabEnabled(int index) const
class FancyColorButton : public QWidget
{
Q_OBJECT
public:
FancyColorButton(QWidget *parent)
: m_parent(parent)
explicit FancyColorButton(QWidget *parent = 0)
: QWidget(parent)
{
setSizePolicy(QSizePolicy::MinimumExpanding, QSizePolicy::Preferred);
}
void mousePressEvent(QMouseEvent *ev)
{
if (ev->modifiers() & Qt::ShiftModifier) {
QColor color = QColorDialog::getColor(StyleHelper::requestedBaseColor(), m_parent);
if (color.isValid())
StyleHelper::setBaseColor(color);
emit clicked(ev->button(), ev->modifiers());
}
}
private:
QWidget *m_parent;
signals:
void clicked(Qt::MouseButton button, Qt::KeyboardModifiers modifiers);
};
//////
@@ -430,7 +426,9 @@ FancyTabWidget::FancyTabWidget(QWidget *parent)
QHBoxLayout *layout = new QHBoxLayout(bar);
layout->setMargin(0);
layout->setSpacing(0);
layout->addWidget(new FancyColorButton(this));
auto fancyButton = new FancyColorButton(this);
connect(fancyButton, &FancyColorButton::clicked, this, &FancyTabWidget::topAreaClicked);
layout->addWidget(fancyButton);
selectionLayout->addWidget(bar);
selectionLayout->addWidget(m_tabBar, 1);
@@ -571,3 +569,5 @@ bool FancyTabWidget::isTabEnabled(int index) const
{
return m_tabBar->isTabEnabled(index);
}
#include "fancytabwidget.moc"

View File

@@ -162,6 +162,7 @@ public:
signals:
void currentAboutToShow(int index);
void currentChanged(int index);
void topAreaClicked(Qt::MouseButton button, Qt::KeyboardModifiers modifiers);
public slots:
void setCurrentIndex(int index);

View File

@@ -145,6 +145,14 @@ IDocument::OpenResult IDocument::open(QString *errorString, const QString &fileN
return OpenResult::CannotHandle;
}
bool IDocument::save(QString *errorString, const QString &fileName, bool autoSave)
{
Q_UNUSED(errorString)
Q_UNUSED(fileName)
Q_UNUSED(autoSave)
return false;
}
/*!
* Returns the current contents of the document. The base implementation returns an empty
* QByteArray.
@@ -180,6 +188,14 @@ IDocument::ReloadBehavior IDocument::reloadBehavior(ChangeTrigger state, ChangeT
return BehaviorAsk;
}
bool IDocument::reload(QString *errorString, ReloadFlag flag, ChangeType type)
{
Q_UNUSED(errorString)
Q_UNUSED(flag)
Q_UNUSED(type)
return true;
}
void IDocument::checkPermissions()
{
}
@@ -189,6 +205,16 @@ bool IDocument::shouldAutoSave() const
return false;
}
bool IDocument::isModified() const
{
return false;
}
bool IDocument::isSaveAsAllowed() const
{
return false;
}
bool IDocument::isFileReadOnly() const
{
if (filePath().isEmpty())

View File

@@ -89,7 +89,7 @@ public:
// required to be re-implemented for documents of IEditors
virtual OpenResult open(QString *errorString, const QString &fileName, const QString &realFileName);
virtual bool save(QString *errorString, const QString &fileName = QString(), bool autoSave = false) = 0;
virtual bool save(QString *errorString, const QString &fileName = QString(), bool autoSave = false);
virtual QByteArray contents() const;
virtual bool setContents(const QByteArray &contents);
@@ -112,11 +112,11 @@ public:
void setMimeType(const QString &mimeType);
virtual bool shouldAutoSave() const;
virtual bool isModified() const = 0;
virtual bool isSaveAsAllowed() const = 0;
virtual bool isModified() const;
virtual bool isSaveAsAllowed() const;
virtual ReloadBehavior reloadBehavior(ChangeTrigger state, ChangeType type) const;
virtual bool reload(QString *errorString, ReloadFlag flag, ChangeType type) = 0;
virtual bool reload(QString *errorString, ReloadFlag flag, ChangeType type);
virtual void checkPermissions();

View File

@@ -79,6 +79,7 @@
#include <QApplication>
#include <QCloseEvent>
#include <QColorDialog>
#include <QDebug>
#include <QDir>
#include <QFileInfo>
@@ -175,6 +176,13 @@ MainWindow::MainWindow() :
setCorner(Qt::BottomRightCorner, Qt::BottomDockWidgetArea);
m_modeManager = new ModeManager(this, m_modeStack);
connect(m_modeStack, &FancyTabWidget::topAreaClicked, this, [](Qt::MouseButton, Qt::KeyboardModifiers modifiers) {
if (modifiers & Qt::ShiftModifier) {
QColor color = QColorDialog::getColor(StyleHelper::requestedBaseColor(), ICore::dialogParent());
if (color.isValid())
StyleHelper::setBaseColor(color);
}
});
registerDefaultContainers();
registerDefaultActions();

View File

@@ -488,15 +488,14 @@ void ManhattanStyle::drawPrimitive(PrimitiveElement element, const QStyleOption
QColor shadow(0, 0, 0, 30);
painter->setPen(shadow);
if (pressed) {
QColor shade = option->palette.base().color();
shade.setHsv(shade.hue(), shade.saturation(), 255 - shade.value(), 40);
const QColor shade = creatorTheme()->color(Theme::FancyToolButtonSelectedColor);
painter->fillRect(rect, shade);
const QRectF borderRect = QRectF(rect).adjusted(0.5, 0.5, -0.5, -0.5);
painter->drawLine(borderRect.topLeft() + QPointF(1, 0), borderRect.topRight() - QPointF(1, 0));
painter->drawLine(borderRect.topLeft(), borderRect.bottomLeft());
painter->drawLine(borderRect.topRight(), borderRect.bottomRight());
} else if (option->state & State_Enabled && option->state & State_MouseOver) {
painter->fillRect(rect, creatorTheme()->color(Theme::PanelButtonToolBackgroundColorHover));
painter->fillRect(rect, creatorTheme()->color(Theme::FancyToolButtonHoverColor));
} else if (widget && widget->property("highlightWidget").toBool()) {
QColor shade(0, 0, 0, 128);
painter->fillRect(rect, shade);
@@ -529,7 +528,7 @@ void ManhattanStyle::drawPrimitive(PrimitiveElement element, const QStyleOption
painter->drawLine(borderRect.topLeft(), borderRect.topRight());
painter->restore();
} else {
painter->fillRect(rect, creatorTheme()->color(Theme::PanelStatusBarBackgroundColor));
painter->fillRect(rect, StyleHelper::baseColor());
}
}
break;
@@ -652,9 +651,7 @@ void ManhattanStyle::drawControl(ControlElement element, const QStyleOption *opt
const bool dis = !(mbi->state & State_Enabled);
if (creatorTheme()->flag(Theme::FlatMenuBar))
painter->fillRect(option->rect, StyleHelper::isBaseColorDefault()
? creatorTheme()->color(Theme::MenuBarItemBackgroundColor)
: StyleHelper::baseColor());
painter->fillRect(option->rect, StyleHelper::baseColor());
else
StyleHelper::menuGradient(painter, option->rect, option->rect);
@@ -792,9 +789,7 @@ void ManhattanStyle::drawControl(ControlElement element, const QStyleOption *opt
option->rect.bottomRight() + QPointF(0.5, 0.5));
painter->restore();
} else {
painter->fillRect(option->rect, StyleHelper::isBaseColorDefault()
? creatorTheme()->color(Theme::MenuBarEmptyAreaBackgroundColor)
: StyleHelper::baseColor());
painter->fillRect(option->rect, StyleHelper::baseColor());
}
}
break;
@@ -816,9 +811,7 @@ void ManhattanStyle::drawControl(ControlElement element, const QStyleOption *opt
bool drawLightColored = lightColored(widget);
// draws the background of the 'Type hierarchy', 'Projects' headers
if (creatorTheme()->widgetStyle() == Theme::StyleFlat)
painter->fillRect(rect, StyleHelper::isBaseColorDefault()
? creatorTheme()->color(Theme::ToolBarBackgroundColor)
: StyleHelper::baseColor(drawLightColored));
painter->fillRect(rect, StyleHelper::baseColor(drawLightColored));
else if (horizontal)
StyleHelper::horizontalGradient(painter, gradientSpan, rect, drawLightColored);
else

View File

@@ -72,9 +72,9 @@ void MiniSplitterHandle::resizeEvent(QResizeEvent *event)
void MiniSplitterHandle::paintEvent(QPaintEvent *event)
{
QPainter painter(this);
const QColor color = m_lightColored
? Utils::StyleHelper::borderColor(m_lightColored)
: Utils::creatorTheme()->color(Utils::Theme::SplitterColor);
const QColor color = Utils::creatorTheme()->color(
m_lightColored ? Utils::Theme::FancyToolBarSeparatorColor
: Utils::Theme::SplitterColor);
painter.fillRect(event->rect(), color);
}

View File

@@ -686,17 +686,15 @@ void OutputPaneToggleButton::paintEvent(QPaintEvent*)
if (image)
StyleHelper::drawCornerImage(*image, &p, rect(), numberAreaWidth, buttonBorderWidth, buttonBorderWidth, buttonBorderWidth);
} else {
QColor c;
if (isChecked()) {
c = creatorTheme()->color(hovered ? Theme::BackgroundColorHover
: Theme::BackgroundColorSelected);
} else if (isDown()) {
c = creatorTheme()->color(Theme::BackgroundColorSelected);
} else {
c = creatorTheme()->color(hovered ? Theme::BackgroundColorHover
: Theme::BackgroundColorDark);
}
p.fillRect(rect(), c);
Theme::Color c = Theme::BackgroundColorDark;
if (hovered)
c = Theme::BackgroundColorHover;
else if (isDown() || isChecked())
c = Theme::BackgroundColorSelected;
if (c != Theme::BackgroundColorDark)
p.fillRect(rect(), creatorTheme()->color(c));
}
if (m_flashTimer->state() == QTimeLine::Running)

View File

@@ -296,7 +296,7 @@ void FutureProgress::paintEvent(QPaintEvent *)
{
QPainter p(this);
if (creatorTheme()->widgetStyle() == Theme::StyleFlat) {
p.fillRect(rect(), creatorTheme()->color(Theme::FutureProgressBackgroundColor));
p.fillRect(rect(), StyleHelper::baseColor());
} else {
QLinearGradient grad = StyleHelper::statusBarGradient(rect());
p.fillRect(rect(), grad);

View File

@@ -229,11 +229,7 @@ void ProgressBar::paintEvent(QPaintEvent *)
double range = maximum() - minimum();
double percent = 0.;
if (!qFuzzyIsNull(range))
percent = (value() - minimum()) / range;
if (percent > 1)
percent = 1;
else if (percent < 0)
percent = 0;
percent = qBound(0., (value() - minimum()) / range, 1.);
if (finished())
percent = 1;
@@ -285,22 +281,20 @@ void ProgressBar::paintEvent(QPaintEvent *)
QRectF inner = rect.adjusted(2, 2, -2, -2);
inner.adjust(0, 0, qRound((percent - 1) * inner.width()), 0);
QColor c;
if (m_error) {
c = creatorTheme()->color(Theme::ProgressBarColorError);
// avoid too small red bar
if (inner.width() < 10)
inner.adjust(0, 0, 10 - inner.width(), 0);
} else if (m_finished) {
c = creatorTheme()->color(Theme::ProgressBarColorFinished);
} else {
c = creatorTheme()->color(Theme::ProgressBarColorNormal);
}
// Show at least a hint of progress. Non-flat needs more pixels due to the borders.
inner.setWidth(qMax(qMin(3.0, qreal(rect.width())), inner.width()));
Theme::Color themeColor = Theme::ProgressBarColorNormal;
if (m_error)
themeColor = Theme::ProgressBarColorError;
else if (m_finished)
themeColor = Theme::ProgressBarColorFinished;
const QColor c = creatorTheme()->color(themeColor);
//draw the progress bar
if (creatorTheme()->widgetStyle() == Theme::StyleFlat) {
p.fillRect(rect.adjusted(2, 2, -2, -2),
creatorTheme()->color(Theme::FancyToolButtonHoverColor));
creatorTheme()->color(Theme::ProgressBarBackgroundColor));
p.fillRect(inner, c);
} else {
const static QImage bar(StyleHelper::dpiSpecificImageFile(

View File

@@ -172,7 +172,7 @@ void ThemeChooser::apply()
const QString themeId = d->m_themeListModel->themeAt(index).id().toString();
QSettings *settings = ICore::settings();
const QString currentThemeId = settings->value(QLatin1String(Constants::SETTINGS_THEME),
QLatin1String("default")).toString();
QLatin1String(Constants::DEFAULT_THEME)).toString();
if (currentThemeId != themeId) {
QMessageBox::information(ICore::mainWindow(), tr("Restart Required"),
tr("The theme change will take effect after a restart of Qt Creator."));
@@ -206,7 +206,7 @@ QList<ThemeEntry> ThemeEntry::availableThemes()
qWarning() << "Warning: No themes found in installation: "
<< QDir::toNativeSeparators(installThemeDir);
// move default theme to front
int defaultIndex = Utils::indexOf(themes, Utils::equal(&ThemeEntry::id, Id("default")));
int defaultIndex = Utils::indexOf(themes, Utils::equal(&ThemeEntry::id, Id(Constants::DEFAULT_THEME)));
if (defaultIndex > 0) { // == exists and not at front
ThemeEntry defaultEntry = themes.takeAt(defaultIndex);
themes.prepend(defaultEntry);

View File

@@ -235,8 +235,6 @@ CdbEngine::CdbEngine(const DebuggerRunParameters &sp) :
m_extensionCommandPrefixBA("!" QT_CREATOR_CDB_EXT "."),
m_operateByInstructionPending(true),
m_operateByInstruction(true), // Default CDB setting
m_verboseLogPending(true),
m_verboseLog(false), // Default CDB setting
m_hasDebuggee(false),
m_wow64State(wow64Uninitialized),
m_elapsedLogTime(0),
@@ -249,8 +247,6 @@ CdbEngine::CdbEngine(const DebuggerRunParameters &sp) :
connect(action(OperateByInstruction), &QAction::triggered,
this, &CdbEngine::operateByInstructionTriggered);
connect(action(VerboseLog), &QAction::triggered,
this, &CdbEngine::verboseLogTriggered);
connect(action(CreateFullBacktrace), &QAction::triggered,
this, &CdbEngine::createFullBacktrace);
connect(&m_process, static_cast<void(QProcess::*)(int)>(&QProcess::finished),
@@ -272,9 +268,7 @@ void CdbEngine::init()
m_nextCommandToken = 0;
m_currentBuiltinResponseToken = -1;
m_operateByInstructionPending = action(OperateByInstruction)->isChecked();
m_verboseLogPending = boolSetting(VerboseLog);
m_operateByInstruction = true; // Default CDB setting
m_verboseLog = false; // Default CDB setting
m_hasDebuggee = false;
m_sourceStepInto = false;
m_watchPointX = m_watchPointY = 0;
@@ -321,13 +315,6 @@ void CdbEngine::operateByInstructionTriggered(bool operateByInstruction)
syncOperateByInstruction(operateByInstruction);
}
void CdbEngine::verboseLogTriggered(bool verboseLog)
{
m_verboseLogPending = verboseLog;
if (state() == InferiorStopOk)
syncVerboseLog(verboseLog);
}
void CdbEngine::syncOperateByInstruction(bool operateByInstruction)
{
if (debug)
@@ -340,15 +327,6 @@ void CdbEngine::syncOperateByInstruction(bool operateByInstruction)
runCommand({m_operateByInstruction ? "l-s" : "l+s", NoFlags});
}
void CdbEngine::syncVerboseLog(bool verboseLog)
{
if (m_verboseLog == verboseLog)
return;
QTC_ASSERT(m_accessible, return);
m_verboseLog = verboseLog;
runCommand({m_verboseLog ? "!sym noisy" : "!sym quiet", NoFlags});
}
bool CdbEngine::canHandleToolTip(const DebuggerToolTipContext &context) const
{
Q_UNUSED(context);
@@ -566,9 +544,6 @@ bool CdbEngine::launchCDB(const DebuggerRunParameters &sp, QString *errorMessage
if (boolSetting(IgnoreFirstChanceAccessViolation))
arguments << QLatin1String("-x");
const QStringList &symbolPaths = stringListSetting(CdbSymbolPaths);
if (!symbolPaths.isEmpty())
arguments << QLatin1String("-y") << symbolPaths.join(QLatin1Char(';'));
const QStringList &sourcePaths = stringListSetting(CdbSourcePaths);
if (!sourcePaths.isEmpty())
arguments << QLatin1String("-srcpath") << sourcePaths.join(QLatin1Char(';'));
@@ -664,6 +639,19 @@ void CdbEngine::setupInferior()
runCommand({cdbAddBreakpointCommand(bp, m_sourcePathMappings, id, true), BuiltinCommand,
[this, id](const DebuggerResponse &r) { handleBreakInsert(r, id); }});
}
// setting up symbol search path
QStringList symbolPaths = stringListSetting(CdbSymbolPaths);
const QProcessEnvironment &env = m_process.processEnvironment();
QString symbolPath = env.value(QLatin1String("_NT_ALT_SYMBOL_PATH"));
if (!symbolPath.isEmpty())
symbolPaths += symbolPath;
symbolPath = env.value(QLatin1String("_NT_SYMBOL_PATH"));
if (!symbolPath.isEmpty())
symbolPaths += symbolPath;
runCommand({".sympath \"" + symbolPaths.join(QLatin1Char(';')).toLatin1() + '"', NoFlags});
runCommand({"!sym noisy", NoFlags}); // Show symbol load information.
runCommand({"sxn 0x4000001f", NoFlags}); // Do not break on WowX86 exceptions.
runCommand({"sxn ibp", NoFlags}); // Do not break on initial breakpoints.
runCommand({".asm source_line", NoFlags}); // Source line in assembly
@@ -1261,7 +1249,6 @@ void CdbEngine::doUpdateLocals(const UpdateParameters &updateParameters)
}
}
}
if (boolSetting(VerboseLog))
str << blankSeparator << "-v";
if (boolSetting(UseDebuggingHelpers))
str << blankSeparator << "-c";
@@ -1668,7 +1655,6 @@ void CdbEngine::handleRegistersExt(const DebuggerResponse &response)
void CdbEngine::handleLocals(const DebuggerResponse &response, bool partialUpdate)
{
if (response.resultClass == ResultDone) {
if (boolSetting(VerboseLog))
showMessage(QLatin1String(response.data.toString()), LogDebug);
GdbMi partial;
@@ -1887,8 +1873,6 @@ void CdbEngine::handleSessionIdle(const QByteArray &messageBA)
elapsedLogTime(), messageBA.constData(),
stateName(state()), m_specialStopMode);
syncVerboseLog(m_verboseLogPending);
// Switch source level debugging
syncOperateByInstruction(m_operateByInstructionPending);
@@ -2392,7 +2376,6 @@ void CdbEngine::parseOutputLine(QByteArray line)
command.function.data(), m_currentBuiltinResponseToken,
m_currentBuiltinResponse.count('\n'), m_commandForToken.size() - 1);
QTC_ASSERT(token == m_currentBuiltinResponseToken, return);
if (boolSetting(VerboseLog))
showMessage(QLatin1String(m_currentBuiltinResponse), LogMisc);
if (command.callback) {
DebuggerResponse response;

View File

@@ -124,7 +124,6 @@ private slots:
void processFinished();
void runCommand(const DebuggerCommand &cmd) override;
void operateByInstructionTriggered(bool);
void verboseLogTriggered(bool);
void consoleStubError(const QString &);
void consoleStubProcessStarted();
@@ -184,7 +183,6 @@ private:
inline bool isCdbProcessRunning() const { return m_process.state() != QProcess::NotRunning; }
bool canInterruptInferior() const;
void syncOperateByInstruction(bool operateByInstruction);
void syncVerboseLog(bool verboseLog);
void postWidgetAtCommand();
void handleCustomSpecialStop(const QVariant &v);
void postFetchMemory(const MemoryViewCookie &c);
@@ -240,8 +238,6 @@ private:
const QByteArray m_extensionCommandPrefixBA; //!< Library name used as prefix
bool m_operateByInstructionPending; //!< Creator operate by instruction action changed.
bool m_operateByInstruction;
bool m_verboseLogPending; //!< Creator verbose log action changed.
bool m_verboseLog;
bool m_hasDebuggee;
enum Wow64State {
wow64Uninitialized,

View File

@@ -211,7 +211,6 @@ CommonOptionsPageWidget::CommonOptionsPageWidget
m_group->insert(action(ShowQObjectNames), 0);
m_group->insert(action(SortStructMembers), 0);
m_group->insert(action(LogTimeStamps), 0);
m_group->insert(action(VerboseLog), 0);
m_group->insert(action(BreakOnThrow), 0);
m_group->insert(action(BreakOnCatch), 0);
if (Utils::HostOsInfo::isWindowsHost()) {

View File

@@ -141,6 +141,11 @@ SOURCES += registerpostmortemaction.cpp
LIBS *= -lole32 \
-lshell32
}
equals(TEST, 1) {
RESOURCES += debuggerunittests.qrc
}
include(cdb/cdb.pri)
include(gdb/gdb.pri)
include(pdb/pdb.pri)

View File

@@ -18,6 +18,16 @@ QtcPlugin {
Depends { name: "QtSupport" }
Depends { name: "TextEditor" }
Depends {
name: "Qt.test"
condition: project.testsEnabled
}
pluginTestDepends: [
"QmakeProjectManager"
]
cpp.includePaths: base.concat([project.sharedSourcesDir + "/registryaccess"])
pluginRecommends: [
@@ -253,6 +263,21 @@ QtcPlugin {
]
}
Group {
name: "Unit tests"
condition: project.testsEnabled
files: [
"debuggerunittests.qrc",
]
}
Group {
name: "Unit test resources"
prefix: "unit-tests/"
fileTags: []
files: ["**/*"]
}
Export {
Depends { name: "QtcSsh" }
Depends { name: "CPlusPlus" }

View File

@@ -16,3 +16,6 @@ QTC_PLUGIN_DEPENDS += \
texteditor
QTC_PLUGIN_RECOMMENDS += \
cppeditor
QTC_TEST_DEPENDS += \
qmakeprojectmanager

Some files were not shown because too many files have changed in this diff Show More