Commit c0b85dbd authored by hjk's avatar hjk
Browse files

Merge branch 'master' of git@scm.dev.nokia.troll.no:creator/mainline

parents 53ab86dc 665dc480
......@@ -110,7 +110,7 @@ PathChooser::PathChooser(QWidget *parent) :
connect(m_d->m_lineEdit, SIGNAL(textChanged(QString)), this, SIGNAL(changed()));
connect(m_d->m_lineEdit, SIGNAL(validChanged()), this, SIGNAL(validChanged()));
m_d->m_lineEdit->setMinimumWidth(260);
m_d->m_lineEdit->setMinimumWidth(200);
hLayout->addWidget(m_d->m_lineEdit);
hLayout->setSizeConstraint(QLayout::SetMinimumSize);
......
......@@ -845,7 +845,7 @@ void Qt4ProFileNode::updateUiFiles()
}
addFileNodes(toAdd, this);
}
modelManager->updateSourceFiles(toUpdate);
m_project->addUiFilesToCodeModel(toUpdate);
}
ProFileReader *Qt4PriFileNode::createProFileReader() const
......
......@@ -255,6 +255,10 @@ Qt4Project::Qt4Project(Qt4Manager *manager, const QString& fileName) :
m_updateCodeModelTimer.setSingleShot(true);
m_updateCodeModelTimer.setInterval(20);
connect(&m_updateCodeModelTimer, SIGNAL(timeout()), this, SLOT(updateCodeModel()));
m_addUiFilesTimer.setSingleShot(true);
m_addUiFilesTimer.setInterval(20);
connect(&m_addUiFilesTimer, SIGNAL(timeout()), this, SLOT(addUiFiles()));
}
Qt4Project::~Qt4Project()
......@@ -370,6 +374,27 @@ namespace {
};
}
void Qt4Project::addUiFilesToCodeModel(const QStringList &files)
{
// if we already have a full updateCodeModel() scheduled
// then we don't need to this seperately
// since that one will add also all the ui files
if (m_updateCodeModelTimer.isActive())
return;
m_addUiFilesTimer.start();
m_uiFilesToAdd << files;
}
void Qt4Project::addUiFiles()
{
if (m_updateCodeModelTimer.isActive())
return;
CppTools::CppModelManagerInterface *modelManager =
ExtensionSystem::PluginManager::instance()->getObject<CppTools::CppModelManagerInterface>();
modelManager->updateSourceFiles(m_uiFilesToAdd);
m_uiFilesToAdd.clear();
}
void Qt4Project::scheduleUpdateCodeModel()
{
m_updateCodeModelTimer.start();
......
......@@ -182,6 +182,9 @@ public:
void notifyChanged(const QString &name);
// called by qt4ProjectNode to add ui_*.h files to the codemodel
void addUiFilesToCodeModel(const QStringList &files);
public slots:
void update();
void proFileParseError(const QString &errorMessage);
......@@ -200,6 +203,7 @@ private slots:
const Qt4ProjectManager::Internal::Qt4ProjectType oldType,
const Qt4ProjectManager::Internal::Qt4ProjectType newType);
void proFileUpdated(Qt4ProjectManager::Internal::Qt4ProFileNode *node);
void addUiFiles();
protected:
virtual void restoreSettingsImpl(ProjectExplorer::PersistentSettingsReader &settingsReader);
......@@ -232,6 +236,8 @@ private:
Internal::Qt4ProjectFiles *m_projectFiles;
QTimer m_updateCodeModelTimer;
QTimer m_addUiFilesTimer;
QStringList m_uiFilesToAdd;
Internal::GCCPreprocessor m_preproc;
friend class Qt4ProjectFile;
......
......@@ -38,7 +38,6 @@ namespace ResourceEditor {
namespace Constants {
const char * const C_RESOURCEEDITOR = "Resource Editor";
const char * const C_RESOURCEWINDOW = "Resourcewindow";
const char * const C_RESOURCE_MIMETYPE = "application/vnd.nokia.xml.qt.resource";
} // namespace Constants
......
......@@ -161,7 +161,7 @@ bool ResourceEditorFile::save(const QString &name /*= QString()*/)
}
const char *ResourceEditorW::kind() const {
return ResourceEditor::Constants::C_RESOURCEWINDOW;
return ResourceEditor::Constants::C_RESOURCEEDITOR;
}
QString ResourceEditorFile::fileName() const
......
......@@ -39,7 +39,7 @@
#include <QtGui/QFileDialog>
#include <QtGui/QMessageBox>
namespace SharedTools {
using namespace SharedTools;
QrcEditor::QrcEditor(QWidget *parent)
: QWidget(parent),
......@@ -405,5 +405,3 @@ void QrcEditor::onRedo()
updateCurrent();
updateHistoryControls();
}
} // namespace SharedTools
......@@ -9,7 +9,7 @@ SOURCES = customwidgets.cpp
# Link against the qtcreator utils lib
unix {
linux-* {
# form abs path to qtcreator lib dir
GH_LIB=$$dirname(PWD)
GH_LIB=$$dirname(GH_LIB)
......@@ -19,7 +19,13 @@ unix {
}
INCLUDEPATH += ../../../src/libs
LIBS += -L../../../lib -lUtils
macx {
LIBS += -L../../../bin/QtCreator.app/Contents/PlugIns
CONFIG(debug, debug|release):LIBS += -lUtils_debug
else:LIBS += -lUtils
} else {
LIBS += -L../../../lib -lUtils
}
DESTDIR= $$[QT_INSTALL_PLUGINS]/designer
Supports Markdown
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment