Commit b7c34292 authored by Eike Ziller's avatar Eike Ziller
Browse files

Merge remote-tracking branch 'origin/2.5'

Conflicts:
	tests/system/objects.map

Change-Id: Ie6aed14f2f61111d26498ff3684ea4a57e6da59e
parents b2f4679c 9499fef8
......@@ -49,7 +49,7 @@
\o Windows Vista
\o (K)Ubuntu Linux 8.04 (32-bit and 64-bit) or later, with the
\o (K)Ubuntu Linux 10.04 (32-bit and 64-bit) or later, with the
following:
\list
......
......@@ -283,7 +283,8 @@ int main(int argc, char **argv)
uiLanguages.prepend(overrideLanguage);
const QString &creatorTrPath = QCoreApplication::applicationDirPath()
+ QLatin1String(SHARE_PATH "/translations");
foreach (const QString &locale, uiLanguages) {
foreach (QString locale, uiLanguages) {
locale.replace(QLatin1Char('-'), QLatin1Char('_')); // work around QTBUG-25973
if (translator.load(QLatin1String("qtcreator_") + locale, creatorTrPath)) {
const QString &qtTrPath = QLibraryInfo::location(QLibraryInfo::TranslationsPath);
const QString &qtTrFile = QLatin1String("qt_") + locale;
......
......@@ -237,9 +237,7 @@ MainWindow::MainWindow() :
#endif
m_autoSaveSessionTimer = new QTimer(this);
m_autoSaveSessionTimer->setSingleShot(true);
m_autoSaveSessionTimer->setInterval(10000);
m_autoSaveSessionTimer->start();
connect(m_autoSaveSessionTimer, SIGNAL(timeout()),
m_coreImpl, SIGNAL(saveSettingsRequested()));
}
......@@ -383,6 +381,7 @@ void MainWindow::extensionsInitialized()
emit m_coreImpl->coreAboutToOpen();
show();
emit m_coreImpl->coreOpened();
m_autoSaveSessionTimer->start();
}
void MainWindow::closeEvent(QCloseEvent *event)
......
......@@ -1260,13 +1260,15 @@ void ProjectExplorerPlugin::savePersistentSettings()
if (d->m_shuttingDown)
return;
foreach (Project *pro, d->m_session->projects())
pro->saveSettings();
if (!d->m_session->loadingSession()) {
foreach (Project *pro, d->m_session->projects())
pro->saveSettings();
if (d->m_session->isDefaultVirgin()) {
// do not save new virgin default sessions
} else {
d->m_session->save();
if (d->m_session->isDefaultVirgin()) {
// do not save new virgin default sessions
} else {
d->m_session->save();
}
}
QSettings *s = Core::ICore::settings();
......@@ -1520,7 +1522,6 @@ void ProjectExplorerPlugin::restoreSession()
Core::ICore::openFiles(combinedList, Core::ICore::OpenFilesFlags(Core::ICore::CanContainLineNumbers | Core::ICore::SwitchMode));
updateActions();
}
void ProjectExplorerPlugin::loadSession(const QString &session)
......
......@@ -93,6 +93,7 @@ SessionManager::SessionManager(QObject *parent)
m_sessionNode(new SessionNode(this)),
m_sessionName(QLatin1String("default")),
m_virginSession(true),
m_loadingSession(false),
m_startupProject(0)
{
connect(ModeManager::instance(), SIGNAL(currentModeChanged(Core::IMode*)),
......@@ -294,6 +295,11 @@ void SessionManager::removeProject(Project *project)
removeProjects(QList<Project*>() << project);
}
bool SessionManager::loadingSession()
{
return m_loadingSession;
}
bool SessionManager::save()
{
if (debug)
......@@ -818,17 +824,23 @@ bool SessionManager::loadSession(const QString &session)
}
}
m_loadingSession = true;
// Allow everyone to set something in the session and before saving
emit aboutToUnloadSession(m_sessionName);
if (!isDefaultVirgin()) {
if (!save())
if (!save()) {
m_loadingSession = false;
return false;
}
}
// Clean up
if (!ICore::editorManager()->closeAllEditors())
if (!ICore::editorManager()->closeAllEditors()) {
m_loadingSession = false;
return false;
}
setStartupProject(0);
removeProjects(projects());
......@@ -883,6 +895,7 @@ bool SessionManager::loadSession(const QString &session)
// Starts a event loop, better do that at the very end
askUserAboutFailedProjects();
m_loadingSession = false;
return true;
}
......
......@@ -123,6 +123,7 @@ public:
QStringList projectsForSessionName(const QString &session) const;
void reportProjectLoadingProgress();
bool loadingSession();
signals:
void projectAdded(ProjectExplorer::Project *project);
void singleProjectAdded(ProjectExplorer::Project *project);
......@@ -169,6 +170,7 @@ private:
mutable QStringList m_sessions;
mutable QHash<Project *, QStringList> m_projectFileCache;
bool m_loadingSession;
Project *m_startupProject;
QList<Project *> m_projects;
......
:*Qt Creator.Build Project_Core::Internal::FancyToolButton {text='Build Project' type='Core::Internal::FancyToolButton' unnamed='1' visible='1' window=':Qt Creator_Core::Internal::MainWindow'}
:*Qt Creator.Continue_Core::Internal::FancyToolButton {text='Continue' type='Core::Internal::FancyToolButton' unnamed='1' visible='1' window=':Qt Creator_Core::Internal::MainWindow'}
:*Qt Creator.Interrupt_Core::Internal::FancyToolButton {text='Interrupt' type='Core::Internal::FancyToolButton' unnamed='1' visible='1' window=':Qt Creator_Core::Internal::MainWindow'}
:*Qt Creator.Run_Core::Internal::FancyToolButton {text='Run' type='Core::Internal::FancyToolButton' unnamed='1' visible='1' window=':Qt Creator_Core::Internal::MainWindow'}
:*Qt Creator.Start Debugging_Core::Internal::FancyToolButton {text='Start Debugging' type='Core::Internal::FancyToolButton' unnamed='1' visible='1' window=':Qt Creator_Core::Internal::MainWindow'}
:*Qt Creator.findEdit_Utils::FilterLineEdit {name='findEdit' type='Utils::FilterLineEdit' visible='1' window=':Qt Creator_Core::Internal::MainWindow'}
:*Qt Creator.qt_tabwidget_stackedwidget_QStackedWidget {name='qt_tabwidget_stackedwidget' type='QStackedWidget' visible='1' window=':Qt Creator_Core::Internal::MainWindow'}
:*Qt Creator_Core::Internal::FancyToolButton {occurrence='3' type='Core::Internal::FancyToolButton' unnamed='1' visible='1' window=':Qt Creator_Core::Internal::MainWindow'}
:*Qt Creator_Utils::FilterLineEdit {type='Utils::FilterLineEdit' unnamed='1' visible='1' window=':Qt Creator_Core::Internal::MainWindow'}
:*Qt Creator_Utils::IconButton {occurrence='4' type='Utils::IconButton' unnamed='1' visible='1' window=':Qt Creator_Core::Internal::MainWindow'}
......@@ -49,12 +46,10 @@
:Qt Creator_CppEditor::Internal::CPPEditorWidget {type='CppEditor::Internal::CPPEditorWidget' unnamed='1' visible='1' window=':Qt Creator_Core::Internal::MainWindow'}
:Qt Creator_QTableView {type='QTableView' unnamed='1' visible='1' window=':Qt Creator_Core::Internal::MainWindow'}
:Qt Creator_SearchResult_Core::Internal::OutputPaneToggleButton {occurrence='2' type='Core::Internal::OutputPaneToggleButton' unnamed='1' visible='1' window=':Qt Creator_Core::Internal::MainWindow'}
:Qt Creator_Utils::IconButton {occurrence='2' type='Utils::IconButton' unnamed='1' visible='1' window=':Qt Creator_Core::Internal::MainWindow'}
:Qt Creator_Utils::NavigationTreeView {type='Utils::NavigationTreeView' unnamed='1' visible='1' window=':Qt Creator_Core::Internal::MainWindow'}
:Qt Gui Application.Form file:_QLabel {name='formLabel' text='Form file:' type='QLabel' visible='1' window=':Qt Gui Application_Qt4ProjectManager::Internal::GuiAppWizardDialog'}
:Qt Gui Application.Header file:_QLabel {name='headerLabel' text='Header file:' type='QLabel' visible='1' window=':Qt Gui Application_Qt4ProjectManager::Internal::GuiAppWizardDialog'}
:Qt Gui Application.Source file:_QLabel {name='sourceLabel' text='Source file:' type='QLabel' visible='1' window=':Qt Gui Application_Qt4ProjectManager::Internal::GuiAppWizardDialog'}
:Qt Gui Application.frame_QFrame {name='frame' type='QFrame' visible='1' window=':Qt Gui Application_Qt4ProjectManager::Internal::GuiAppWizardDialog'}
:Qt Gui Application.scrollArea_QScrollArea {name='scrollArea' type='QScrollArea' visible='1'}
:Qt Gui Application_Qt4ProjectManager::Internal::GuiAppWizardDialog {type='Qt4ProjectManager::Internal::GuiAppWizardDialog' unnamed='1' visible='1' windowTitle='Qt Gui Application'}
:QtCreator.MenuBar_ProjectExplorer::Internal::MiniProjectTargetSelector {type='ProjectExplorer::Internal::MiniProjectTargetSelector'}
......
......@@ -5,7 +5,7 @@
<data>
<variable>QtVersion.0</variable>
<valuemap type="QVariantMap">
<value type="int" key="Id">4</value>
<value type="int" key="Id">3</value>
<value type="QString" key="Name">Qt for Fremantle PR1.3 Devices (Qt SDK)</value>
<value type="QString" key="QMakePath">~/QtSDK/Maemo/4.6.2/targets/fremantle-pr13/bin/qmake</value>
<value type="QString" key="QtVersion.Type">Qt4ProjectManager.QtVersion.Maemo</value>
......@@ -15,7 +15,7 @@
<data>
<variable>QtVersion.1</variable>
<valuemap type="QVariantMap">
<value type="int" key="Id">5</value>
<value type="int" key="Id">4</value>
<value type="QString" key="Name">Desktop Qt 4.7.4 for GCC (Qt SDK)</value>
<value type="QString" key="QMakePath">~/QtSDK/Desktop/Qt/474/gcc/bin/qmake</value>
<value type="QString" key="QtVersion.Type">Qt4ProjectManager.QtVersion.Desktop</value>
......@@ -25,7 +25,7 @@
<data>
<variable>QtVersion.2</variable>
<valuemap type="QVariantMap">
<value type="int" key="Id">6</value>
<value type="int" key="Id">5</value>
<value type="QString" key="Name">Simulator Qt for GCC (Qt SDK)</value>
<value type="QString" key="QMakePath">~/QtSDK/Simulator/Qt/gcc/bin/qmake</value>
<value type="QString" key="QtVersion.Type">Qt4ProjectManager.QtVersion.Simulator</value>
......@@ -34,16 +34,6 @@
</data>
<data>
<variable>QtVersion.3</variable>
<valuemap type="QVariantMap">
<value type="int" key="Id">8</value>
<value type="QString" key="Name">4.7.0</value>
<value type="QString" key="QMakePath">/usr/bin/qmake</value>
<value type="QString" key="QtVersion.Type">Qt4ProjectManager.QtVersion.Desktop</value>
<value type="bool" key="isAutodetected">false</value>
</valuemap>
</data>
<data>
<variable>QtVersion.4</variable>
<valuemap type="QVariantMap">
<value type="int" key="Id">1</value>
<value type="QString" key="Name">Harmattan Target (Qt SDK)</value>
......@@ -53,7 +43,7 @@
</valuemap>
</data>
<data>
<variable>QtVersion.5</variable>
<variable>QtVersion.4</variable>
<valuemap type="QVariantMap">
<value type="int" key="Id">2</value>
<value type="QString" key="Name">Desktop Qt 4.8 for GCC (Qt SDK)</value>
......@@ -64,7 +54,7 @@
</data>
<data>
<variable>QtVersion.Count</variable>
<value type="int">6</value>
<value type="int">5</value>
</data>
<data>
<variable>Version</variable>
......
......@@ -31,7 +31,7 @@ def ensureChecked(objectName, shouldBeChecked = True):
else:
state = "unchecked"
test.log("New state for QCheckBox: %s" % state)
test.verify(object.checked == shouldBeChecked)
test.verify(waitFor("object.checked == shouldBeChecked", 1000))
return object
# verify that an object is in an expected enable state. Returns the object.
......@@ -198,8 +198,10 @@ def logApplicationOutput():
try:
output = waitForObject("{type='Core::OutputWindow' visible='1' windowTitle='Application Output Window'}", 20000)
test.log("Application Output:\n%s" % output.plainText)
return str(output.plainText)
except:
test.fail("Could not find any Application Output - did the project run?")
return None
# get the output from a given cmdline call
def getOutputFromCmdline(cmdline):
......
QT_PLATFORM_PLUGIN=nonesuch
:*Qt Creator.Clear_QToolButton {text='Clear' type='QToolButton' unnamed='1' visible='1' window=':Qt Creator_Core::Internal::MainWindow'}
:Next_QPushButton {text~='(Next.*|Continue)' type='QPushButton' visible='1'}
:Options.OK_QPushButton {text='OK' type='QPushButton' unnamed='1' visible='1' window=':Options_Core::Internal::SettingsDialog'}
:Qt Creator.Compile Output_Core::OutputWindow {type='Core::OutputWindow' unnamed='1' visible='1' window=':Qt Creator_Core::Internal::MainWindow' windowTitle='Compile Output'}
:Qt Creator.QtCreator.MenuBar_QMenuBar {name='QtCreator.MenuBar' type='QMenuBar' visible='1' window=':Qt Creator_Core::Internal::MainWindow'}
:Qt Creator.ReRun_QToolButton {toolTip='Re-run this run-configuration' type='QToolButton' unnamed='1' visible='1' window=':Qt Creator_Core::Internal::MainWindow'}
:Qt Creator.Stop_QToolButton {text='Stop' type='QToolButton' unnamed='1' visible='1' window=':Qt Creator_Core::Internal::MainWindow'}
:Qt Creator.scrollArea_QScrollArea {name='scrollArea' type='QScrollArea' visible='1' window=':Qt Creator_Core::Internal::MainWindow'}
:Qt Creator_AppOutput_Core::Internal::OutputPaneToggleButton {occurrence='3' type='Core::Internal::OutputPaneToggleButton' unnamed='1' visible='1' window=':Qt Creator_Core::Internal::MainWindow'}
:Qt Creator_Core::Internal::MainWindow {type='Core::Internal::MainWindow' unnamed='1' visible='1' windowTitle?='*Qt Creator'}
:Qt Gui Application.Form file:_QLabel {name='formLabel' text='Form file:' type='QLabel' visible='1' window=':Qt Gui Application_Qt4ProjectManager::Internal::GuiAppWizardDialog'}
:Qt Gui Application.Header file:_QLabel {name='headerLabel' text='Header file:' type='QLabel' visible='1' window=':Qt Gui Application_Qt4ProjectManager::Internal::GuiAppWizardDialog'}
:Qt Gui Application.Source file:_QLabel {name='sourceLabel' text='Source file:' type='QLabel' visible='1' window=':Qt Gui Application_Qt4ProjectManager::Internal::GuiAppWizardDialog'}
:Qt Gui Application.scrollArea_QScrollArea {name='scrollArea' type='QScrollArea' visible='1'}
:Qt Gui Application_Qt4ProjectManager::Internal::GuiAppWizardDialog {type='Qt4ProjectManager::Internal::GuiAppWizardDialog' unnamed='1' visible='1' windowTitle='Qt Gui Application'}
:addToVersionControlComboBox_QComboBox {name='addToVersionControlComboBox' type='QComboBox' visible='1'}
:formFileLineEdit_Utils::FileNameValidatingLineEdit {buddy=':Qt Gui Application.Form file:_QLabel' name='formFileLineEdit' type='Utils::FileNameValidatingLineEdit' visible='1'}
:headerFileLineEdit_Utils::FileNameValidatingLineEdit {buddy=':Qt Gui Application.Header file:_QLabel' name='headerFileLineEdit' type='Utils::FileNameValidatingLineEdit' visible='1'}
:scrollArea.Create Build Configurations:_QComboBox_2 {container=':Qt Gui Application.scrollArea_QScrollArea' leftWidget=':scrollArea.Create Build Configurations:_QLabel_2' type='QComboBox' unnamed='1' visible='1'}
:scrollArea.Create Build Configurations:_QLabel_2 {container=':Qt Gui Application.scrollArea_QScrollArea' text='Create build configurations:' type='QLabel' unnamed='1' visible='1'}
:scrollArea.Edit build configuration:_QComboBox {container=':Qt Creator.scrollArea_QScrollArea' leftWidget=':scrollArea.Edit build configuration:_QLabel' type='QComboBox' unnamed='1' visible='1'}
:scrollArea.Edit build configuration:_QLabel {container=':Qt Creator.scrollArea_QScrollArea' text='Edit build configuration:' type='QLabel' unnamed='1' visible='1'}
:scrollArea.Use Shadow Building_QCheckBox {container=':Qt Gui Application.scrollArea_QScrollArea' text='Shadow build' type='QCheckBox' unnamed='1' visible='1'}
:sourceFileLineEdit_Utils::FileNameValidatingLineEdit {buddy=':Qt Gui Application.Source file:_QLabel' name='sourceFileLineEdit' type='Utils::FileNameValidatingLineEdit' visible='1'}
# shared script for APTW suite
# helping to run and close app
# verification
# verify if building and running of project was successful
def verifyBuildAndRun():
# check compile output if build successful
checkCompile()
# check application output log
appOutput = logApplicationOutput()
if appOutput:
test.verify(re.search(".*([Pp]rogram).*(unexpectedly).*([Ff]inished).*", str(appOutput)) and
re.search('[Ss]tarting.*', str(appOutput)),
"Verifying if built app started and closed successfully.")
# pick version 4.7.4 and then run project for debug and release
def pickVersion474runVerify():
availableConfigs = iterateBuildConfigs(1, 0, ".*4.7.4.*")
if not availableConfigs:
test.fatal("Haven't found needed Qt version (Qt 4.7.4), quitting")
invokeMenuItem("File", "Save All")
invokeMenuItem("File", "Exit")
# select debug configuration
for config in availableConfigs:
selectBuildConfig(1, 0, config)
test.log("Using build config '%s'" % config)
runAndCloseApp()
verifyBuildAndRun()
mouseClick(waitForObject(":*Qt Creator.Clear_QToolButton"))
AUT=qtcreator
CLASS=
CLASSPATH=
ENVVARS=envvars
HOOK_SUB_PROCESSES=false
IMPLICITAUTSTART=0
LANGUAGE=Python
TEST_CASES=tst_APTW01 tst_APTW02
VERSION=2
WRAPPERS=Qt
source("../../shared/qtcreator.py")
source("../../shared/suites_qtta.py")
source("../shared/aptw.py")
# test New Qt Gui Application build and run for release and debug option
def main():
startApplication("qtcreator" + SettingsPath)
createProject_Qt_GUI(tempDir(), "SampleApp")
# pick version 4.7.4 and then run project for debug and release and verify results
pickVersion474runVerify()
#close Qt creator
invokeMenuItem("File", "Exit")
#no cleanup needed
source("../../shared/qtcreator.py")
source("../../shared/suites_qtta.py")
source("../shared/aptw.py")
# test New Qt Quick Application build and run for release and debug option
def main():
startApplication("qtcreator" + SettingsPath)
createNewQtQuickApplication(tempDir(), "SampleApp")
waitForSignal("{type='CppTools::Internal::CppModelManager' unnamed='1'}", "sourceFilesRefreshed(QStringList)")
# pick version 4.7.4 and then run project for debug and release and verify results
pickVersion474runVerify()
#close Qt creator
invokeMenuItem("File", "Exit")
#no cleanup needed
......@@ -35,7 +35,7 @@ def main():
test.compare(editor.textCursor().selectionStart(), 0)
test.compare(editor.textCursor().selectionEnd(), size)
test.compare(editor.textCursor().position(), size)
test.log("Pressing key %s" % key)
test.log("Pressing key: %s" % key.replace("<", "").replace(">", ""))
type(editor, key)
if key == "<Up>":
test.compare(editor.textCursor().selectionStart(), editor.textCursor().selectionEnd())
......@@ -43,7 +43,7 @@ def main():
pos = size
if key == "<Left>":
pos -= 1
if platform.system() != 'Darwin' and JIRA.isBugStillOpen(7215, JIRA.Bug.CREATOR):
if JIRA.isBugStillOpen(7215, JIRA.Bug.CREATOR):
test.warning("Using workaround for %s-%d" % (JIRA.Bug.CREATOR, 7215))
pos = 0
test.compare(editor.textCursor().selectionStart(), pos)
......
Supports Markdown
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment