Merge remote-tracking branch 'origin/4.2'

Conflicts:
	src/shared/qbs

Change-Id: Ic39fd1c411632f56312fae31c0c88ebc1098b5a4
This commit is contained in:
Eike Ziller
2017-01-30 10:55:40 +01:00
10 changed files with 56 additions and 29 deletions

View File

@@ -25997,7 +25997,7 @@ Preselects a desktop Qt for building the application if available.</source>
</message>
<message>
<source>Creates a deployable Qt Quick 2 application using Qt Quick Controls 2.&lt;br/&gt;&lt;br/&gt;&lt;b&gt;Note:&lt;/b&gt; Qt Quick Controls 2 are available with Qt 5.7 and later.</source>
<translation>Создание устанавливаемого приложение Qt Quick 2 с использованием Qt Quick Controls 2.&lt;br/&gt;&lt;br/&gt;&lt;b&gt;Замечание:&lt;/b&gt;Qt Quick Controls 2 недоступны начиная с Qt 5.7.</translation>
<translation>Создание устанавливаемого приложение Qt Quick 2 с использованием Qt Quick Controls 2.&lt;br/&gt;&lt;br/&gt;&lt;b&gt;Замечание: &lt;/b&gt;Qt Quick Controls 2 доступны начиная с Qt 5.7.</translation>
</message>
<message>
<source>Enable native styling. Requires dependency on the QtWidgets module.</source>

View File

@@ -149,6 +149,8 @@
#include <QTreeWidget>
#include <QVBoxLayout>
#include <QVariant>
#include <QJsonDocument>
#include <QJsonObject>
#include <QtPlugin>
#ifdef WITH_TESTS
@@ -2151,6 +2153,29 @@ void DebuggerPlugin::attachExternalApplication(RunControl *rc)
createAndScheduleRun(rp, kit);
}
void DebuggerPlugin::getEnginesState(QByteArray *json) const
{
QTC_ASSERT(json, return);
QVariantMap result {
{ "version", 1 }
};
QVariantMap states;
for (int i = 0; i < dd->m_snapshotHandler->size(); ++i) {
const DebuggerEngine *engine = dd->m_snapshotHandler->at(i);
states[QString::number(i)] = QVariantMap({
{ "current", dd->m_snapshotHandler->currentIndex() == i },
{ "pid", engine->inferiorPid() },
{ "state", engine->state() }
});
}
if (!states.isEmpty())
result["states"] = states;
*json = QJsonDocument(QJsonObject::fromVariantMap(result)).toJson();
}
void DebuggerPluginPrivate::attachToQmlPort()
{
DebuggerRunParameters rp;

View File

@@ -56,6 +56,9 @@ private:
// Called from AppOutputPane::attachToRunControl().
Q_SLOT void attachExternalApplication(ProjectExplorer::RunControl *rc);
// Called from GammaRayIntegration
Q_SLOT void getEnginesState(QByteArray *json) const;
QList<QObject *> createTestObjects() const override;
};

View File

@@ -1062,10 +1062,12 @@ bool GitPlugin::submitEditorAboutToClose()
m_gitClient->interactiveRebase(m_submitRepository, amendSHA1, true);
} else {
m_gitClient->continueCommandIfNeeded(m_submitRepository);
if (editor->panelData().pushAction == NormalPush)
if (editor->panelData().pushAction == NormalPush) {
m_gitClient->push(m_submitRepository);
else if (editor->panelData().pushAction == PushToGerrit)
connect(editor, &QObject::destroyed, this, &GitPlugin::delayedPushToGerrit);
} else if (editor->panelData().pushAction == PushToGerrit) {
connect(editor, &QObject::destroyed, this, &GitPlugin::delayedPushToGerrit,
Qt::QueuedConnection);
}
}
return true;

View File

@@ -2582,6 +2582,16 @@ void ProjectExplorerPlugin::runRunConfiguration(RunConfiguration *rc,
emit m_instance->updateRunActions();
}
QList<QPair<Runnable, ProcessHandle>> ProjectExplorerPlugin::runningRunControlProcesses()
{
QList<QPair<Runnable, ProcessHandle>> processes;
foreach (RunControl *rc, dd->m_outputPane->allRunControls()) {
if (rc->isRunning())
processes << qMakePair(rc->runnable(), rc->applicationProcessHandle());
}
return processes;
}
void ProjectExplorerPluginPrivate::projectAdded(Project *pro)
{
if (m_projectsMode)

View File

@@ -52,6 +52,7 @@ class Project;
class Node;
class FolderNode;
class FileNode;
class ProcessHandle;
namespace Internal { class ProjectExplorerSettings; }
@@ -139,6 +140,7 @@ public:
static void runStartupProject(Core::Id runMode, bool forceSkipDeploy = false);
static void runRunConfiguration(RunConfiguration *rc, Core::Id runMode,
const bool forceSkipDeploy = false);
static QList<QPair<Runnable, ProcessHandle>> runningRunControlProcesses();
static void addExistingFiles(FolderNode *folderNode, const QStringList &filePaths);

View File

@@ -1,12 +1 @@
"squishversion" "qtversion" "mkspec" "path"
"5.0" "4.7" "macx-g++" "~/QtSDK/src/creator-test-data/Squish5_47_Mac"
"5.0" "4.7" "linux-g++" "~/QtSDK/src/creator-test-data/Squish5_47_Linux32"
"5.0" "4.7" "linux-g++-64" "~/QtSDK/src/creator-test-data/Squish5_47_Linux64"
"5.0" "4.8" "macx-g++" "~/QtSDK/src/creator-test-data/Squish5_48_Mac"
"5.0" "4.8" "linux-g++" "~/QtSDK/src/creator-test-data/Squish5_48_Linux32"
"5.0" "4.8" "linux-g++-64" "~/QtSDK/src/creator-test-data/Squish5_48_Linux64"
"5.0" "5.0" "macx-clang" "~/QtSDK/src/creator-test-data/Squish5_50_Mac"
"5.0" "5.0" "linux-g++" "~/QtSDK/src/creator-test-data/Squish5_50_Linux32"
"5.0" "5.0" "linux-g++-64" "~/QtSDK/src/creator-test-data/Squish5_50_Linux64"
"5.0" "5.0" "win32-g++" "C:\QtSDK\src\creator-test-data\Squish5_50_MinGW"
"5.0" "5.0" "win32-msvc2010" "C:\QtSDK\src\creator-test-data\Squish5_50_MSVC10"
1 squishversion qtversion mkspec path
5.0 4.7 macx-g++ ~/QtSDK/src/creator-test-data/Squish5_47_Mac
5.0 4.7 linux-g++ ~/QtSDK/src/creator-test-data/Squish5_47_Linux32
5.0 4.7 linux-g++-64 ~/QtSDK/src/creator-test-data/Squish5_47_Linux64
5.0 4.8 macx-g++ ~/QtSDK/src/creator-test-data/Squish5_48_Mac
5.0 4.8 linux-g++ ~/QtSDK/src/creator-test-data/Squish5_48_Linux32
5.0 4.8 linux-g++-64 ~/QtSDK/src/creator-test-data/Squish5_48_Linux64
5.0 5.0 macx-clang ~/QtSDK/src/creator-test-data/Squish5_50_Mac
5.0 5.0 linux-g++ ~/QtSDK/src/creator-test-data/Squish5_50_Linux32
5.0 5.0 linux-g++-64 ~/QtSDK/src/creator-test-data/Squish5_50_Linux64
5.0 5.0 win32-g++ C:\QtSDK\src\creator-test-data\Squish5_50_MinGW
5.0 5.0 win32-msvc2010 C:\QtSDK\src\creator-test-data\Squish5_50_MSVC10

View File

@@ -66,9 +66,12 @@ def main():
type(editorWidget, "<Return>")
type(editorWidget, "re")
triggerCompletion(editorWidget)
waitForObjectItem(":popupFrame_Proposal_QListView", "realpath")
doubleClickItem(":popupFrame_Proposal_QListView", "realpath", 5, 5, 0, Qt.LeftButton)
test.compare(str(lineUnderCursor(editorWidget)).strip(), "realpath()",
functionName = "realpath"
if platform.system() in ('Windows', 'Microsoft'):
functionName = "realloc"
waitForObjectItem(":popupFrame_Proposal_QListView", functionName)
doubleClickItem(":popupFrame_Proposal_QListView", functionName, 5, 5, 0, Qt.LeftButton)
test.compare(str(lineUnderCursor(editorWidget)).strip(), functionName + "()",
"Step 3: Verifying if: The list of suggestions is opened. It is "
"possible to select one of the suggestions.")
# Step 4: Insert text "voi" to new line and press Tab.

View File

@@ -53,7 +53,7 @@ def main():
switchViewTo(ViewConstants.HELP)
manualQModelIndex = getQModelIndexStr("text?='Qt Creator Manual *'",
":Qt Creator_QHelpContentWidget")
doubleClick(manualQModelIndex, 5, 5, 0, Qt.LeftButton)
doubleClick(waitForObject(manualQModelIndex), 5, 5, 0, Qt.LeftButton)
mouseClick(waitForObject(getQModelIndexStr("text='Building and Running an Example'",
manualQModelIndex)), 5, 5, 0, Qt.LeftButton)
helpSelector = waitForObject(":Qt Creator_HelpSelector_QComboBox")

View File

@@ -47,9 +47,6 @@ def main():
def testRenameId():
test.log("Testing rename of id")
navTree = waitForObject("{type='Utils::NavigationTreeView' unnamed='1' visible='1' "
"window=':Qt Creator_Core::Internal::MainWindow'}")
model = navTree.model()
files = ["FocusCore.ContextMenu\\.qml", "FocusCore.GridMenu\\.qml",
"FocusCore.ListMenu\\.qml", "focus\\.qml"]
originalTexts = {}
@@ -90,7 +87,7 @@ def testRenameId():
test.compare(originalText,formerTxt, "Comparing %s" % file.replace("FocusCore.","").replace("\\",""))
invokeMenuItem("File","Save All")
def __invokeFindUsage__(treeView, filename, line, additionalKeyPresses, expectedCount):
def __invokeFindUsage__(filename, line, additionalKeyPresses, expectedCount):
openDocument("focus.QML.qml" + os.sep + "focus.%s" % filename)
editor = waitForObject(":Qt Creator_QmlJSEditor::QmlJSTextEditorWidget")
if not placeCursorToLine(editor, line, True):
@@ -104,19 +101,15 @@ def __invokeFindUsage__(treeView, filename, line, additionalKeyPresses, expected
def testFindUsages():
test.log("Testing find usage of an ID")
navTree = waitForObject("{type='Utils::NavigationTreeView' unnamed='1' visible='1' "
"window=':Qt Creator_Core::Internal::MainWindow'}")
__invokeFindUsage__(navTree, "focus\\.qml", "FocusScope\s*\{", ["<Down>"], 6)
__invokeFindUsage__("focus\\.qml", "FocusScope\s*\{", ["<Down>"], 6)
test.log("Testing find usage of a property")
clickButton(waitForObject(":*Qt Creator.Clear_QToolButton"))
home = "<Home>"
if platform.system() == "Darwin":
home = "<Ctrl+Left>"
__invokeFindUsage__(navTree, "focus\\.qml", "id: window", ["<Down>", "<Down>", home], 26)
__invokeFindUsage__("focus\\.qml", "id: window", ["<Down>", "<Down>", home], 26)
def testHovering():
navTree = waitForObject("{type='Utils::NavigationTreeView' unnamed='1' visible='1' "
"window=':Qt Creator_Core::Internal::MainWindow'}")
test.log("Testing hovering elements")
openDocument("focus.QML.qml" + os.sep + "focus.focus\\.qml")
editor = waitForObject(":Qt Creator_QmlJSEditor::QmlJSTextEditorWidget")