forked from qt-creator/qt-creator
Adds dynamic ui completion. Wohoo :)
This means, creating a new project, we immediately have completion for the ui file. Also adding stuff to the ui file now changes the codemodel immediately. Yet todo, are tests under windows and suppressing a warning if the form contains a toplevel spacer.
This commit is contained in:
@@ -384,6 +384,7 @@ void QtVersion::setPath(const QString &path)
|
||||
m_versionInfoUpToDate = false;
|
||||
m_mkspecUpToDate = false;
|
||||
m_qmakeCommand = QString::null;
|
||||
m_uicCommand = QString::null;
|
||||
// TODO do i need to optimize this?
|
||||
m_hasDebuggingHelper = !debuggingHelperLibrary().isEmpty();
|
||||
}
|
||||
@@ -753,6 +754,29 @@ QString QtVersion::qmakeCommand() const
|
||||
return QString::null;
|
||||
}
|
||||
|
||||
QString QtVersion::uicCommand() const
|
||||
{
|
||||
if (!isValid())
|
||||
return QString::null;
|
||||
if (!m_uicCommand.isNull())
|
||||
return m_uicCommand;
|
||||
QString qtdirbin = versionInfo().value("QT_INSTALL_BINS") + "/";
|
||||
QStringList possibleCommands;
|
||||
#ifdef Q_OS_WIN
|
||||
possibleCommands<< "uic.exe";
|
||||
#else
|
||||
possibleCommands << "uic-qt4" << "uic4" << "uic" ;
|
||||
#endif
|
||||
foreach (const QString &possibleCommand, possibleCommands) {
|
||||
const QString &fullPath = qtdirbin + possibleCommand;
|
||||
if (QFileInfo(fullPath).exists()) {
|
||||
m_uicCommand = QDir::cleanPath(fullPath);
|
||||
return m_uicCommand;
|
||||
}
|
||||
}
|
||||
return QString::null;
|
||||
}
|
||||
|
||||
ProjectExplorer::ToolChain::ToolChainType QtVersion::toolchainType() const
|
||||
{
|
||||
if (!isValid())
|
||||
|
||||
Reference in New Issue
Block a user