Commit 737aaf02 authored by Eike Ziller's avatar Eike Ziller
Browse files

Merge remote-tracking branch 'origin/2.4'

parents a2625999 1f82042a
......@@ -97,30 +97,5 @@
\endlist
\br\br
\o \bold{NetSieben SSH Library is a Secure Shell client library for C++.
Version 1.3.2}\br
\list
\o \bold{Commercial License:} For organizations who do not want to
release the source code for their applications as open source/
free software; in other words they do not want to comply with the
GNU General Public License (GPL) or Q Public License.
\o \bold{Non Commercial / Open Source License:} NetSieben believes in
contributing back to the open source community, thus it has released
the SSH Library under Q Public License as it is defined by Trolltech
AS of Norway. The Open Source License allows the user to use software
under an open source / free software license, and distribute it
freely. The software can be used at no charge with the condition
that if the user uses the SSH Library in an application they wish to
redistribute, then the complete source code for your application must
be available and freely redistributable under reasonable conditions.
For more information on the used QPL License see:
QtCreator/src/libs/3rdparty/net7ssh/LICENSE.QPL
\endlist\br\br
The source code of NetSieben Secure Shell C++ Library can be found
here:
\list
\o QtCreator/src/libs/3rdparty
\o \l{http://qt.gitorious.org/qt-creator/qt-creator/trees/master/src/libs/3rdparty}
\endlist
\endlist
*/
......@@ -155,7 +155,7 @@ static inline int askMsgSendFailed()
QMessageBox::Retry);
}
static inline QStringList getPluginPaths(QSettings *settings)
static inline QStringList getPluginPaths()
{
QStringList rc;
// Figure out root: Up one from 'bin'
......@@ -289,7 +289,7 @@ int main(int argc, char **argv)
#endif
#endif
// Load
const QStringList pluginPaths = getPluginPaths(settings);
const QStringList pluginPaths = getPluginPaths();
pluginManager.setPluginPaths(pluginPaths);
QMap<QString, QString> foundAppOptions;
......
......@@ -282,21 +282,21 @@ bool *VCSBaseClientSettings::boolPointer(const QString &key)
QString *VCSBaseClientSettings::stringPointer(const QString &key)
{
if (hasKey(key))
if (hasKey(key) && valueType(key) == QVariant::String)
return d->m_valueHash[key].m_comp.strPtr;
return 0;
}
int VCSBaseClientSettings::intValue(const QString &key, int defaultValue) const
{
if (hasKey(key))
if (hasKey(key) && valueType(key) == QVariant::Int)
return d->m_valueHash[key].m_comp.intValue;
return defaultValue;
}
bool VCSBaseClientSettings::boolValue(const QString &key, bool defaultValue) const
{
if (hasKey(key))
if (hasKey(key) && valueType(key) == QVariant::Bool)
return d->m_valueHash[key].m_comp.boolValue;
return defaultValue;
}
......
......@@ -195,7 +195,7 @@ void VCSBaseEditorParameterWidget::mapSetting(QComboBox *comboBox, QString *sett
d->m_settingMapping.insert(comboBox, Internal::SettingMappingData(setting));
if (setting) {
comboBox->blockSignals(true);
const int itemIndex = comboBox->findData(*setting);
const int itemIndex = setting ? comboBox->findData(*setting) : -1;
if (itemIndex != -1)
comboBox->setCurrentIndex(itemIndex);
comboBox->blockSignals(false);
......
def invokeMenuItem(menu, item):
menuObject = waitForObjectItem("{type='QMenuBar' visible='true'}", menu)
activateItem(menuObject)
activateItem(waitForObjectItem(objectMap.realName(menuObject), item))
def openQmakeProject(projectPath):
invokeMenuItem("File", "Open File or Project...")
if platform.system()=="Darwin":
snooze(1)
nativeType("<Command+Shift+g>")
snooze(1)
nativeType(projectPath)
snooze(1)
nativeType("<Return>")
snooze(2)
nativeType("<Return>")
else:
waitForObject("{name='QFileDialog' type='QFileDialog' visible='1' windowTitle='Open File'}")
type(findObject("{name='fileNameEdit' type='QLineEdit'}"), projectPath)
clickButton(findObject("{text='Open' type='QPushButton'}"))
waitForObject("{type='Qt4ProjectManager::Internal::ProjectLoadWizard' visible='1' windowTitle='Project Setup'}")
selectFromCombo(":scrollArea.Create Build Configurations:_QComboBox", "For Each Qt Version One Debug And One Release")
clickButton(findObject("{text~='(Finish|Done)' type='QPushButton'}"))
def openCmakeProject(projectPath):
invokeMenuItem("File", "Open File or Project...")
if platform.system()=="Darwin":
snooze(1)
nativeType("<Command+Shift+g>")
snooze(1)
nativeType(projectPath)
snooze(1)
nativeType("<Return>")
snooze(2)
nativeType("<Return>")
else:
waitForObject("{name='QFileDialog' type='QFileDialog' visible='1' windowTitle='Open File'}")
type(findObject("{name='fileNameEdit' type='QLineEdit'}"), projectPath)
clickButton(findObject("{text='Open' type='QPushButton'}"))
clickButton(waitForObject(":CMake Wizard.Next_QPushButton", 20000))
generatorCombo = waitForObject(":Generator:_QComboBox")
index = generatorCombo.findText("MinGW Generator (MinGW from SDK)")
if index == -1:
index = generatorCombo.findText("NMake Generator (Microsoft Visual C++ Compiler 9.0 (x86))")
if index != -1:
generatorCombo.setCurrentIndex(index)
clickButton(waitForObject(":CMake Wizard.Run CMake_QPushButton", 20000))
clickButton(waitForObject(":CMake Wizard.Finish_QPushButton", 60000))
def logApplicationOutput():
# make sure application output is shown
toggleAppOutput = waitForObject("{type='Core::Internal::OutputPaneToggleButton' unnamed='1' visible='1' "
"window=':Qt Creator_Core::Internal::MainWindow' occurrence='3'}", 20000)
if not toggleAppOutput.checked:
clickButton(toggleAppOutput)
output = waitForObject("{type='Core::OutputWindow' visible='1' windowTitle='Application Output Window'}", 20000)
test.log("Application Output:\n%s" % output.plainText)
def openQmakeProject(projectPath):
invokeMenuItem("File", "Open File or Project...")
if platform.system()=="Darwin":
snooze(1)
nativeType("<Command+Shift+g>")
snooze(1)
nativeType(projectPath)
snooze(1)
nativeType("<Return>")
snooze(2)
nativeType("<Return>")
else:
waitForObject("{name='QFileDialog' type='QFileDialog' visible='1' windowTitle='Open File'}")
type(findObject("{name='fileNameEdit' type='QLineEdit'}"), projectPath)
clickButton(findObject("{text='Open' type='QPushButton'}"))
waitForObject("{type='Qt4ProjectManager::Internal::ProjectLoadWizard' visible='1' windowTitle='Project Setup'}")
selectFromCombo(":scrollArea.Create Build Configurations:_QComboBox", "For Each Qt Version One Debug And One Release")
clickButton(findObject("{text~='(Finish|Done)' type='QPushButton'}"))
def openCmakeProject(projectPath):
invokeMenuItem("File", "Open File or Project...")
if platform.system()=="Darwin":
snooze(1)
nativeType("<Command+Shift+g>")
snooze(1)
nativeType(projectPath)
snooze(1)
nativeType("<Return>")
snooze(2)
nativeType("<Return>")
else:
waitForObject("{name='QFileDialog' type='QFileDialog' visible='1' windowTitle='Open File'}")
type(findObject("{name='fileNameEdit' type='QLineEdit'}"), projectPath)
clickButton(findObject("{text='Open' type='QPushButton'}"))
clickButton(waitForObject(":CMake Wizard.Next_QPushButton", 20000))
generatorCombo = waitForObject(":Generator:_QComboBox")
index = generatorCombo.findText("MinGW Generator (MinGW from SDK)")
if index == -1:
index = generatorCombo.findText("NMake Generator (Microsoft Visual C++ Compiler 9.0 (x86))")
if index != -1:
generatorCombo.setCurrentIndex(index)
clickButton(waitForObject(":CMake Wizard.Run CMake_QPushButton", 20000))
clickButton(waitForObject(":CMake Wizard.Finish_QPushButton", 60000))
def shadowBuildDir(path, project, qtVersion, debugVersion):
qtVersion = qtVersion.replace(" ", "_")
qtVersion = qtVersion.replace(".", "_")
......@@ -83,3 +127,36 @@ def createProject_Qt_GUI(path, projectName, qtVersion, checks):
test.verify(os.path.exists(h_path), "Checking if '" + h_path + "' was created")
test.verify(os.path.exists(ui_path), "Checking if '" + ui_path + "' was created")
test.verify(os.path.exists(pro_path), "Checking if '" + pro_path + "' was created")
def createNewQtQuickApplication(workingDir, projectName = None, templateFile = None, destination = QtQuickConstants.Destinations.DESKTOP):
invokeMenuItem("File", "New File or Project...")
clickItem(waitForObject("{type='QTreeView' name='templateCategoryView'}", 20000), "Projects.Qt Quick Project", 5, 5, 0, Qt.LeftButton)
clickItem(waitForObject("{name='templatesView' type='QListView'}", 20000), "Qt Quick Application", 5, 5, 0, Qt.LeftButton)
clickButton(waitForObject("{text='Choose...' type='QPushButton' unnamed='1' visible='1'}", 20000))
if projectName!=None:
baseLineEd = waitForObject("{name='nameLineEdit' visible='1' "
"type='Utils::ProjectNameValidatingLineEdit'}", 20000)
replaceEditorContent(baseLineEd, projectName)
baseLineEd = waitForObject("{type='Utils::BaseValidatingLineEdit' unnamed='1' visible='1'}", 20000)
replaceEditorContent(baseLineEd, workingDir)
stateLabel = findObject("{type='QLabel' name='stateLabel'}")
labelCheck = stateLabel.text=="" and stateLabel.styleSheet == ""
test.verify(labelCheck, "Project name and base directory without warning or error")
# make sure this is not set as default location
cbDefaultLocation = waitForObject("{type='QCheckBox' name='projectsDirectoryCheckBox' visible='1'}", 20000)
if cbDefaultLocation.checked:
clickButton(cbDefaultLocation)
nextButton = waitForObject("{text~='(Next.*|Continue)' type='QPushButton' visible='1'}", 20000)
clickButton(nextButton)
if (templateFile==None):
chooseComponents()
else:
chooseComponents(QtQuickConstants.Components.EXISTING_QML)
# define the existing qml file to import
baseLineEd = waitForObject("{type='Utils::BaseValidatingLineEdit' unnamed='1' visible='1'}", 20000)
type(baseLineEd, templateFile)
clickButton(nextButton)
chooseDestination(destination)
snooze(1)
clickButton(nextButton)
clickButton(waitForObject("{type='QPushButton' text~='(Finish|Done)' visible='1'}", 20000))
......@@ -15,9 +15,8 @@ testSettings.logScreenshotOnFail = True
source("../../shared/utils.py")
source("../../shared/build_utils.py")
source("../../shared/mainwin.py")
source("../../shared/project.py")
source("../../shared/qtquick.py")
source("../../shared/project.py")
source("../../shared/editor_utils.py")
def waitForCleanShutdown(timeOut=10):
......
......@@ -121,3 +121,16 @@ def cleanUpUserFiles(pathsToProFiles=None):
doneWithoutErrors = False
return doneWithoutErrors
def invokeMenuItem(menu, item):
menuObject = waitForObjectItem("{type='QMenuBar' visible='true'}", menu)
activateItem(menuObject)
activateItem(waitForObjectItem(objectMap.realName(menuObject), item))
def logApplicationOutput():
# make sure application output is shown
toggleAppOutput = waitForObject("{type='Core::Internal::OutputPaneToggleButton' unnamed='1' visible='1' "
"window=':Qt Creator_Core::Internal::MainWindow' occurrence='3'}", 20000)
if not toggleAppOutput.checked:
clickButton(toggleAppOutput)
output = waitForObject("{type='Core::OutputWindow' visible='1' windowTitle='Application Output Window'}", 20000)
test.log("Application Output:\n%s" % output.plainText)
......@@ -12,7 +12,7 @@ def main():
# using a temporary directory won't mess up an eventually exisiting
workingDir = tempDir()
prepareTemplate(sourceExample)
createNewQtQuickApplication()
createNewQtQuickApplication(workingDir, "untitled", templateDir + "/qml/focus.qml")
# wait for parsing to complete
waitForSignal("{type='CppTools::Internal::CppModelManager' unnamed='1'}", "sourceFilesRefreshed(QStringList)", 30000)
testRenameId()
......@@ -25,39 +25,6 @@ def prepareTemplate(sourceExample):
templateDir = os.path.abspath(templateDir + "/template")
shutil.copytree(sourceExample, templateDir)
def createNewQtQuickApplication():
global workingDir,templateDir
invokeMenuItem("File", "New File or Project...")
clickItem(waitForObject("{type='QTreeView' name='templateCategoryView'}", 20000),
"Projects.Qt Quick Project", 5, 5, 0, Qt.LeftButton)
clickItem(waitForObject("{name='templatesView' type='QListView'}", 20000),
"Qt Quick Application", 5, 5, 0, Qt.LeftButton)
clickButton(waitForObject("{text='Choose...' type='QPushButton' unnamed='1' visible='1'}", 20000))
baseLineEd = waitForObject("{name='nameLineEdit' visible='1' "
"type='Utils::ProjectNameValidatingLineEdit'}", 20000)
replaceEditorContent(baseLineEd, "untitled")
baseLineEd = waitForObject("{type='Utils::BaseValidatingLineEdit' unnamed='1' visible='1'}", 20000)
replaceEditorContent(baseLineEd, workingDir)
stateLabel = findObject("{type='QLabel' name='stateLabel'}")
labelCheck = stateLabel.text=="" and stateLabel.styleSheet == ""
test.verify(labelCheck, "Project name and base directory without warning or error")
# make sure this is not set as default location
cbDefaultLocation = waitForObject("{type='QCheckBox' name='projectsDirectoryCheckBox' visible='1'}", 20000)
if cbDefaultLocation.checked:
clickButton(cbDefaultLocation)
# now there's the 'untitled' project inside a temporary directory - step forward...!
nextButton = waitForObject("{text~='(Next.*|Continue)' type='QPushButton' visible='1'}", 20000)
clickButton(nextButton)
chooseComponents(QtQuickConstants.Components.EXISTING_QML)
# define the existing qml file to import
baseLineEd = waitForObject("{type='Utils::BaseValidatingLineEdit' unnamed='1' visible='1'}", 20000)
type(baseLineEd, templateDir+"/qml/focus.qml")
clickButton(nextButton)
chooseDestination()
snooze(1)
clickButton(nextButton)
clickButton(waitForObject("{type='QPushButton' text~='(Finish|Done)' visible='1'}", 20000))
def testRenameId():
test.log("Testing rename of id")
navTree = waitForObject("{type='Utils::NavigationTreeView' unnamed='1' visible='1' "
......
......@@ -5,7 +5,7 @@ def main():
startApplication("qtcreator" + SettingsPath)
# using a temporary directory won't mess up an eventually exisiting
workingDir = tempDir()
createNewQtQuickApplication()
createNewQtQuickApplication(workingDir, "untitled")
# wait for parsing to complete
waitForSignal("{type='CppTools::Internal::CppModelManager' unnamed='1'}", "sourceFilesRefreshed(QStringList)", 5000)
if not prepareQmlFile():
......@@ -16,36 +16,6 @@ def main():
invokeMenuItem("File", "Save All")
invokeMenuItem("File", "Exit")
def createNewQtQuickApplication():
global workingDir
invokeMenuItem("File", "New File or Project...")
clickItem(waitForObject("{type='QTreeView' name='templateCategoryView'}", 20000),
"Projects.Qt Quick Project", 5, 5, 0, Qt.LeftButton)
clickItem(waitForObject("{name='templatesView' type='QListView'}", 20000),
"Qt Quick Application", 5, 5, 0, Qt.LeftButton)
clickButton(waitForObject("{text='Choose...' type='QPushButton' unnamed='1' visible='1'}", 20000))
baseLineEd = waitForObject("{name='nameLineEdit' visible='1' "
"type='Utils::ProjectNameValidatingLineEdit'}", 20000)
replaceEditorContent(baseLineEd, "untitled")
baseLineEd = waitForObject("{type='Utils::BaseValidatingLineEdit' unnamed='1' visible='1'}", 20000)
replaceEditorContent(baseLineEd, workingDir)
stateLabel = findObject("{type='QLabel' name='stateLabel'}")
labelCheck = stateLabel.text=="" and stateLabel.styleSheet == ""
test.verify(labelCheck, "Project name and base directory without warning or error")
# make sure this is not set as default location
cbDefaultLocation = waitForObject("{type='QCheckBox' name='projectsDirectoryCheckBox' visible='1'}", 20000)
if cbDefaultLocation.checked:
clickButton(cbDefaultLocation)
# now there's the 'untitled' project inside a temporary directory - step forward...!
nextButton = waitForObject("{text~='(Next.*|Continue)' type='QPushButton' visible='1'}", 20000)
clickButton(nextButton)
chooseComponents()
clickButton(nextButton)
chooseDestination(QtQuickConstants.Destinations.DESKTOP)
snooze(1)
clickButton(nextButton)
clickButton(waitForObject("{type='QPushButton' text~='(Finish|Done)' visible='1'}", 20000))
def prepareQmlFile():
# make sure the QML file is opened
navTree = waitForObject("{type='Utils::NavigationTreeView' unnamed='1' visible='1' "
......
......@@ -7,7 +7,7 @@ def main():
startApplication("qtcreator" + SettingsPath)
# using a temporary directory won't mess up an eventually exisiting
workingDir = tempDir()
createNewQtQuickApplication()
createNewQtQuickApplication(workingDir)
# wait for parsing to complete
waitForSignal("{type='CppTools::Internal::CppModelManager' unnamed='1'}", "sourceFilesRefreshed(QStringList)", 30000)
test.log("Building project")
......@@ -22,31 +22,6 @@ def main():
logApplicationOutput()
invokeMenuItem("File", "Exit")
def createNewQtQuickApplication():
global workingDir
invokeMenuItem("File", "New File or Project...")
clickItem(waitForObject("{type='QTreeView' name='templateCategoryView'}", 20000), "Projects.Qt Quick Project", 5, 5, 0, Qt.LeftButton)
clickItem(waitForObject("{name='templatesView' type='QListView'}", 20000), "Qt Quick Application", 5, 5, 0, Qt.LeftButton)
clickButton(waitForObject("{text='Choose...' type='QPushButton' unnamed='1' visible='1'}", 20000))
baseLineEd = waitForObject("{type='Utils::BaseValidatingLineEdit' unnamed='1' visible='1'}", 20000)
replaceEditorContent(baseLineEd, workingDir)
stateLabel = findObject("{type='QLabel' name='stateLabel'}")
labelCheck = stateLabel.text=="" and stateLabel.styleSheet == ""
test.verify(labelCheck, "Project name and base directory without warning or error")
# make sure this is not set as default location
cbDefaultLocation = waitForObject("{type='QCheckBox' name='projectsDirectoryCheckBox' visible='1'}", 20000)
if cbDefaultLocation.checked:
clickButton(cbDefaultLocation)
# now there's the 'untitled' project inside a temporary directory - step forward...!
nextButton = waitForObject("{text~='(Next.*|Continue)' type='QPushButton' visible='1'}", 20000)
clickButton(nextButton)
chooseComponents()
clickButton(nextButton)
chooseDestination(QtQuickConstants.Destinations.DESKTOP)
snooze(1)
clickButton(nextButton)
clickButton(waitForObject("{type='QPushButton' text~='(Finish|Done)' visible='1'}", 20000))
def cleanup():
global workingDir
# waiting for a clean exit - for a full-remove of the temp directory
......
......@@ -12,7 +12,7 @@ def main():
# using a temporary directory won't mess up an eventually exisiting
workingDir = tempDir()
prepareTemplate(sourceExample)
createNewQtQuickApplication()
createNewQtQuickApplication(workingDir, None, templateDir + "/qml/textselection.qml")
# wait for parsing to complete
waitForSignal("{type='CppTools::Internal::CppModelManager' unnamed='1'}", "sourceFilesRefreshed(QStringList)", 30000)
test.log("Building project")
......@@ -33,34 +33,6 @@ def prepareTemplate(sourceExample):
templateDir = os.path.abspath(templateDir + "/template")
shutil.copytree(sourceExample, templateDir)
def createNewQtQuickApplication():
global workingDir,templateDir
invokeMenuItem("File", "New File or Project...")
clickItem(waitForObject("{type='QTreeView' name='templateCategoryView'}", 20000), "Projects.Qt Quick Project", 5, 5, 0, Qt.LeftButton)
clickItem(waitForObject("{name='templatesView' type='QListView'}", 20000), "Qt Quick Application", 5, 5, 0, Qt.LeftButton)
clickButton(waitForObject("{text='Choose...' type='QPushButton' unnamed='1' visible='1'}", 20000))
baseLineEd = waitForObject("{type='Utils::BaseValidatingLineEdit' unnamed='1' visible='1'}", 20000)
replaceEditorContent(baseLineEd, workingDir)
stateLabel = findObject("{type='QLabel' name='stateLabel'}")
labelCheck = stateLabel.text=="" and stateLabel.styleSheet == ""
test.verify(labelCheck, "Project name and base directory without warning or error")
# make sure this is not set as default location
cbDefaultLocation = waitForObject("{type='QCheckBox' name='projectsDirectoryCheckBox' visible='1'}", 20000)
if cbDefaultLocation.checked:
clickButton(cbDefaultLocation)
# now there's the 'untitled' project inside a temporary directory - step forward...!
nextButton = waitForObject("{text~='(Next.*|Continue)' type='QPushButton' visible='1'}", 20000)
clickButton(nextButton)
chooseComponents(QtQuickConstants.Components.EXISTING_QML)
# define the existing qml file to import
baseLineEd = waitForObject("{type='Utils::BaseValidatingLineEdit' unnamed='1' visible='1'}", 20000)
type(baseLineEd, templateDir+"/qml/textselection.qml")
clickButton(nextButton)
chooseDestination()
snooze(1)
clickButton(nextButton)
clickButton(waitForObject("{type='QPushButton' text~='(Finish|Done)' visible='1'}", 20000))
def cleanup():
global workingDir,templateDir
# waiting for a clean exit - for a full-remove of the temp directory
......
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