Merge remote branch 'origin/2.1'

This commit is contained in:
Friedemann Kleint
2010-10-27 11:05:31 +02:00
40 changed files with 26000 additions and 7598 deletions

View File

@@ -599,12 +599,9 @@ void Qt4Project::updateQmlJSCodeModel()
projectInfo.importPaths += qtVersionImportPath;
}
}
QmlDumpTool::pathAndEnvironment(this, &projectInfo.qmlDumpPath, &projectInfo.qmlDumpEnvironment);
projectInfo.importPaths.removeDuplicates();
if (projectInfo.qmlDumpPath.isNull()) {
projectInfo.qmlDumpPath = QmlDumpTool::qmlDumpPath(this);
}
modelManager->updateProjectInfo(projectInfo);
}
@@ -1136,6 +1133,10 @@ namespace {
CentralizedFolderWatcher::CentralizedFolderWatcher()
{
m_compressTimer.setSingleShot(true);
m_compressTimer.setInterval(200);
connect(&m_compressTimer, SIGNAL(timeout()),
this, SLOT(onTimer()));
connect (&m_watcher, SIGNAL(directoryChanged(QString)),
this, SLOT(folderChanged(QString)));
}
@@ -1229,8 +1230,20 @@ void CentralizedFolderWatcher::unwatchFolders(const QList<QString> &folders, Qt4
}
}
void CentralizedFolderWatcher::folderChanged(const QString &folder)
{
m_changedFolders.insert(folder);
m_compressTimer.start();
}
void CentralizedFolderWatcher::onTimer()
{
foreach(const QString &folder, m_changedFolders)
delayedFolderChanged(folder);
m_changedFolders.clear();
}
void CentralizedFolderWatcher::delayedFolderChanged(const QString &folder)
{
if (debugCFW)
qDebug()<<"CFW::folderChanged"<<folder;
@@ -1262,7 +1275,6 @@ void CentralizedFolderWatcher::folderChanged(const QString &folder)
if (!folder.endsWith('/'))
folderWithSlash.append('/');
// If a subdirectory was added, watch it too
QSet<QString> tmp = recursiveDirs(folderWithSlash);
if (!tmp.isEmpty()) {