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:
dt
2009-05-12 14:12:20 +02:00
parent 9c9b38e92a
commit af199594a6
11 changed files with 221 additions and 52 deletions

View File

@@ -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())