forked from qt-creator/qt-creator
qttest: Fix issues reported by Krazy
Change-Id: I7bce3cd862b7f680f1b8f42249ae0df4c12e10d9 Reviewed-on: http://codereview.qt-project.org/4299 Reviewed-by: Eike Ziller <eike.ziller@nokia.com> Reviewed-by: Qt Sanity Bot <qt_sanity_bot@ovi.com>
This commit is contained in:
@@ -48,7 +48,6 @@
|
||||
#include <coreplugin/icore.h>
|
||||
#include <coreplugin/modemanager.h>
|
||||
#include <coreplugin/id.h>
|
||||
#include <coreplugin/coreconstants.h>
|
||||
#include <coreplugin/mimedatabase.h>
|
||||
#include <coreplugin/progressmanager/progressmanager.h>
|
||||
|
||||
@@ -306,11 +305,9 @@ void QtTestPlugin::insertTestFunction()
|
||||
if (currentTest) {
|
||||
QString prompt = QLatin1String("<b>") + currentTest->testTypeString()
|
||||
+ QLatin1String(" Test: </b>") + currentTest->testCase();
|
||||
NewTestFunctionDlg dlg(prompt);
|
||||
dlg.exec();
|
||||
|
||||
if (dlg.result() == QDialog::Accepted) {
|
||||
QString testFunc = dlg.testFunctionName->text();
|
||||
QPointer<NewTestFunctionDlg> dlg = new NewTestFunctionDlg(prompt);
|
||||
if (dlg->exec() == QDialog::Accepted) {
|
||||
QString testFunc = dlg->testFunctionName->text();
|
||||
// check for duplicate
|
||||
if (TestFunctionInfo *functionInfo = currentTest->findFunction(testFunc)) {
|
||||
QMessageBox::critical(0, tr("Error"),
|
||||
@@ -318,8 +315,9 @@ void QtTestPlugin::insertTestFunction()
|
||||
currentTest->gotoLine(functionInfo->testStartLine());
|
||||
return;
|
||||
}
|
||||
currentTest->addTestFunction(testFunc, QString(), dlg.insertAtCursor->isChecked());
|
||||
currentTest->addTestFunction(testFunc, QString(), dlg->insertAtCursor->isChecked());
|
||||
}
|
||||
delete dlg;
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user