forked from qt-creator/qt-creator
		
	QmlProfiler: refactored warning messagebox
Change-Id: I41e361fc2dc1cab0f103eccbb15b9c38cc78cb77 Reviewed-on: http://codereview.qt.nokia.com/2041 Reviewed-by: Qt Sanity Bot <qt_sanity_bot@ovi.com> Reviewed-by: Aurindam Jana <aurindam.jana@nokia.com>
This commit is contained in:
		
				
					committed by
					
						 Aurindam Jana
						Aurindam Jana
					
				
			
			
				
	
			
			
			
						parent
						
							cd9fceba3a
						
					
				
				
					commit
					02120e45e7
				
			| @@ -159,7 +159,7 @@ void QmlProfilerEngine::start() | ||||
|  | ||||
|     if (LocalQmlProfilerRunner *qmlRunner = qobject_cast<LocalQmlProfilerRunner *>(d->m_runner)) { | ||||
|         if (!qmlRunner->hasExecutable()) { | ||||
|             showNoExecutableWarning(); | ||||
|             showNonmodalWarning(tr("No executable file to launch.")); | ||||
|             AnalyzerManager::stopTool(); | ||||
|             return; | ||||
|         } | ||||
| @@ -193,15 +193,7 @@ void QmlProfilerEngine::stopped() | ||||
| { | ||||
|     // user feedback | ||||
|     if (d->m_running && d->m_fetchingData) { | ||||
|         Core::ICore * const core = Core::ICore::instance(); | ||||
|         QMessageBox *killedWarning = new QMessageBox(core->mainWindow()); | ||||
|         killedWarning->setIcon(QMessageBox::Warning); | ||||
|         killedWarning->setWindowTitle(tr("QML Profiler")); | ||||
|         killedWarning->setText(tr("Application finished before loading profiled data.\n Please use the stop button instead.")); | ||||
|         killedWarning->setStandardButtons(QMessageBox::Ok); | ||||
|         killedWarning->setDefaultButton(QMessageBox::Ok); | ||||
|         killedWarning->setModal(false); | ||||
|         killedWarning->show(); | ||||
|         showNonmodalWarning(tr("Application finished before loading profiled data.\n Please use the stop button instead.")); | ||||
|     } | ||||
|  | ||||
|     d->m_running = false; | ||||
| @@ -300,13 +292,13 @@ void QmlProfilerEngine::wrongSetupMessageBoxFinished(int button) | ||||
|     } | ||||
| } | ||||
|  | ||||
| void QmlProfilerEngine::showNoExecutableWarning() | ||||
| void QmlProfilerEngine::showNonmodalWarning(const QString &warningMsg) | ||||
| { | ||||
|     Core::ICore * const core = Core::ICore::instance(); | ||||
|     QMessageBox *noExecWarning = new QMessageBox(core->mainWindow()); | ||||
|     noExecWarning->setIcon(QMessageBox::Warning); | ||||
|     noExecWarning->setWindowTitle(tr("QML Profiler")); | ||||
|     noExecWarning->setText(tr("No executable file to launch.")); | ||||
|     noExecWarning->setText(warningMsg); | ||||
|     noExecWarning->setStandardButtons(QMessageBox::Ok); | ||||
|     noExecWarning->setDefaultButton(QMessageBox::Ok); | ||||
|     noExecWarning->setModal(false); | ||||
|   | ||||
		Reference in New Issue
	
	Block a user