Skip to content
GitLab
Projects
Groups
Snippets
/
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
Menu
Open sidebar
Tobias Hunger
qt-creator
Commits
fd6e1858
Commit
fd6e1858
authored
Oct 09, 2009
by
Erik Verbruggen
Browse files
Added fall-back for the QML viewer to first check if there is one bundled with Qt Creator.
parent
926144dc
Changes
1
Hide whitespace changes
Inline
Side-by-side
src/plugins/qmlprojectmanager/qmlproject.cpp
View file @
fd6e1858
...
...
@@ -491,8 +491,19 @@ void QmlRunConfiguration::restore(const ProjectExplorer::PersistentSettingsReade
m_qmlViewerArgs
=
reader
.
restoreValue
(
QLatin1String
(
"qmlviewerargs"
)).
toString
();
m_scriptFile
=
reader
.
restoreValue
(
QLatin1String
(
"mainscript"
)).
toString
();
if
(
m_qmlViewer
.
isEmpty
())
m_qmlViewer
=
Utils
::
SynchronousProcess
::
locateBinary
(
QLatin1String
(
"qmlviewer"
));
if
(
m_qmlViewer
.
isEmpty
())
{
// first see if there is a bundled qmlviewer
#ifdef Q_OS_WIN32
const
QLatin1String
qmlViewerExe
(
"qmlviewer.exe"
);
#else
const
QLatin1String
qmlViewerExe
(
"qmlviewer"
);
#endif
const
QFileInfo
info
(
QCoreApplication
::
applicationDirPath
(),
qmlViewerExe
);
if
(
info
.
exists
()
&&
info
.
isExecutable
())
m_qmlViewer
=
info
.
absoluteFilePath
();
else
// if not, then try to locate it elsewhere
m_qmlViewer
=
Utils
::
SynchronousProcess
::
locateBinary
(
QLatin1String
(
"qmlviewer"
));
}
if
(
m_scriptFile
.
isEmpty
())
m_scriptFile
=
tr
(
"<Current File>"
);
...
...
Write
Preview
Supports
Markdown
0%
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment