diff --git a/src/libs/utils/pathchooser.cpp b/src/libs/utils/pathchooser.cpp index 0f83cf1c4cbdfbcfbf025f90e70276ef67c5a5ed..2555399a422b78009760a5f659405e7f2e0e9f4a 100644 --- a/src/libs/utils/pathchooser.cpp +++ b/src/libs/utils/pathchooser.cpp @@ -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); diff --git a/src/plugins/qt4projectmanager/qt4nodes.cpp b/src/plugins/qt4projectmanager/qt4nodes.cpp index f9990c522fb4d6a8e2748c4b66c17139c3a96c8d..5d05003e8ce88e048a5851d59c0e8a3adc4fa044 100644 --- a/src/plugins/qt4projectmanager/qt4nodes.cpp +++ b/src/plugins/qt4projectmanager/qt4nodes.cpp @@ -845,7 +845,7 @@ void Qt4ProFileNode::updateUiFiles() } addFileNodes(toAdd, this); } - modelManager->updateSourceFiles(toUpdate); + m_project->addUiFilesToCodeModel(toUpdate); } ProFileReader *Qt4PriFileNode::createProFileReader() const diff --git a/src/plugins/qt4projectmanager/qt4project.cpp b/src/plugins/qt4projectmanager/qt4project.cpp index a8fdc907cd0bb1a24a4fdb4fab2092a45f443310..9885221c0c4e2fdc45519d7d12bf72a424caa9e2 100644 --- a/src/plugins/qt4projectmanager/qt4project.cpp +++ b/src/plugins/qt4projectmanager/qt4project.cpp @@ -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(); diff --git a/src/plugins/qt4projectmanager/qt4project.h b/src/plugins/qt4projectmanager/qt4project.h index 24b7e45d6e8dc8e4ee648925e678c89fdc8117a0..0c4a5fb57dcaf1ebe9b8edcab745c0957c39fb6a 100644 --- a/src/plugins/qt4projectmanager/qt4project.h +++ b/src/plugins/qt4projectmanager/qt4project.h @@ -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; diff --git a/src/plugins/resourceeditor/resourceeditorconstants.h b/src/plugins/resourceeditor/resourceeditorconstants.h index 007d537c36e1cea34da0dfdf1629e7e30a39a753..645461a4ddd2f36199da56cfdea4c324ae00ed4f 100644 --- a/src/plugins/resourceeditor/resourceeditorconstants.h +++ b/src/plugins/resourceeditor/resourceeditorconstants.h @@ -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 diff --git a/src/plugins/resourceeditor/resourceeditorw.cpp b/src/plugins/resourceeditor/resourceeditorw.cpp index c8e0bbf51072ddad9ddc86028840b47aeb128c4e..833c6547c9239a20da00c99ebe3ff23c6f26f7e9 100644 --- a/src/plugins/resourceeditor/resourceeditorw.cpp +++ b/src/plugins/resourceeditor/resourceeditorw.cpp @@ -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 diff --git a/src/shared/qrceditor/qrceditor.cpp b/src/shared/qrceditor/qrceditor.cpp index a353d73839496d20f4368e746b68a1b345a9656c..bd25a42d7427ab3f576158bd942781fbcb5990e1 100644 --- a/src/shared/qrceditor/qrceditor.cpp +++ b/src/shared/qrceditor/qrceditor.cpp @@ -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 diff --git a/src/tools/qtcreatorwidgets/qtcreatorwidgets.pro b/src/tools/qtcreatorwidgets/qtcreatorwidgets.pro index 6923e09837dd649062416ec29198c599a8564670..ce209c86d7709b69b28f4ee9a029cbbfa32a49ff 100644 --- a/src/tools/qtcreatorwidgets/qtcreatorwidgets.pro +++ b/src/tools/qtcreatorwidgets/qtcreatorwidgets.pro @@ -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