summaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authorTobias Hunger <tobias.hunger@nokia.com>2011-05-04 16:20:47 +0200
committerTobias Hunger <tobias.hunger@nokia.com>2011-05-06 15:16:43 +0200
commit4f146f6587f3069135c08dd2deb68b477b4edad1 (patch)
treebc15a27a328d839216cf0e2d3f1c7d99fee60029 /src
parent72e01313b6abd993102fc047b6cb2fc62af88734 (diff)
downloadqt-creator-4f146f6587f3069135c08dd2deb68b477b4edad1.tar.gz
Use Core::FileChangeBlocker
Remove class that does something similar. Reviewed-by: Christian Kandeler Change-Id: I7acfa119cf18d96c22d1873a464b1c004c78e132
Diffstat (limited to 'src')
-rw-r--r--src/plugins/qt4projectmanager/qt-maemo/maemodeployablelistmodel.cpp3
-rw-r--r--src/plugins/qt4projectmanager/qt-maemo/maemoglobal.cpp11
-rw-r--r--src/plugins/qt4projectmanager/qt-maemo/maemoglobal.h8
-rw-r--r--src/plugins/qt4projectmanager/qt-maemo/qt4maemotarget.cpp7
4 files changed, 6 insertions, 23 deletions
diff --git a/src/plugins/qt4projectmanager/qt-maemo/maemodeployablelistmodel.cpp b/src/plugins/qt4projectmanager/qt-maemo/maemodeployablelistmodel.cpp
index 40e6725c4b..2cca029049 100644
--- a/src/plugins/qt4projectmanager/qt-maemo/maemodeployablelistmodel.cpp
+++ b/src/plugins/qt4projectmanager/qt-maemo/maemodeployablelistmodel.cpp
@@ -36,6 +36,7 @@
#include "qt4maemotarget.h"
#include <coreplugin/icore.h>
+#include <coreplugin/filemanager.h>
#include <projectexplorer/projectexplorer.h>
#include <projectexplorer/session.h>
#include <qt4projectmanager/qt4buildconfiguration.h>
@@ -299,7 +300,7 @@ QString MaemoDeployableListModel::remoteIconFilePath() const
bool MaemoDeployableListModel::addLinesToProFile(const QStringList &lines)
{
- MaemoGlobal::FileUpdate update(m_proFilePath);
+ Core::FileChangeBlocker update(m_proFilePath);
const QLatin1String separator("\n ");
const QString proFileString = QString(QLatin1Char('\n') + proFileScope()
diff --git a/src/plugins/qt4projectmanager/qt-maemo/maemoglobal.cpp b/src/plugins/qt4projectmanager/qt-maemo/maemoglobal.cpp
index 315083dcb0..3d367a766d 100644
--- a/src/plugins/qt4projectmanager/qt-maemo/maemoglobal.cpp
+++ b/src/plugins/qt4projectmanager/qt-maemo/maemoglobal.cpp
@@ -426,16 +426,5 @@ MaemoGlobal::PackagingSystem MaemoGlobal::packagingSystem(MaemoDeviceConfig::OsV
return static_cast<PackagingSystem>(-1);
}
-MaemoGlobal::FileUpdate::FileUpdate(const QString &fileName)
- : m_fileName(fileName)
-{
- Core::FileManager::instance()->expectFileChange(fileName);
-}
-
-MaemoGlobal::FileUpdate::~FileUpdate()
-{
- Core::FileManager::instance()->unexpectFileChange(m_fileName);
-}
-
} // namespace Internal
} // namespace Qt4ProjectManager
diff --git a/src/plugins/qt4projectmanager/qt-maemo/maemoglobal.h b/src/plugins/qt4projectmanager/qt-maemo/maemoglobal.h
index 9a6925e597..dfc56d3e90 100644
--- a/src/plugins/qt4projectmanager/qt-maemo/maemoglobal.h
+++ b/src/plugins/qt4projectmanager/qt-maemo/maemoglobal.h
@@ -65,14 +65,6 @@ class MaemoGlobal
public:
enum PackagingSystem { Dpkg, Rpm, Tar };
- class FileUpdate {
- public:
- FileUpdate(const QString &fileName);
- ~FileUpdate();
- private:
- const QString m_fileName;
- };
-
static bool isMaemoTargetId(const QString &id);
static bool isFremantleTargetId(const QString &id);
static bool isHarmattanTargetId(const QString &id);
diff --git a/src/plugins/qt4projectmanager/qt-maemo/qt4maemotarget.cpp b/src/plugins/qt4projectmanager/qt-maemo/qt4maemotarget.cpp
index 03674d1060..6a8ea4c138 100644
--- a/src/plugins/qt4projectmanager/qt-maemo/qt4maemotarget.cpp
+++ b/src/plugins/qt4projectmanager/qt-maemo/qt4maemotarget.cpp
@@ -38,6 +38,7 @@
#include "maemotoolchain.h"
#include "qt4maemodeployconfiguration.h"
+#include <coreplugin/filemanager.h>
#include <coreplugin/icore.h>
#include <coreplugin/iversioncontrol.h>
#include <coreplugin/vcsmanager.h>
@@ -420,7 +421,7 @@ bool AbstractDebBasedQt4MaemoTarget::setProjectVersionInternal(const QString &ve
QString content = QString::fromUtf8(reader.data());
content.replace(QRegExp(QLatin1String("\\([a-zA-Z0-9_\\.]+\\)")),
QLatin1Char('(') + version + QLatin1Char(')'));
- MaemoGlobal::FileUpdate update(filePath);
+ Core::FileChangeBlocker update(filePath);
Utils::FileSaver saver(filePath);
saver.write(content.toUtf8());
return saver.finalize(error);
@@ -488,7 +489,7 @@ bool AbstractDebBasedQt4MaemoTarget::setPackageManagerIconInternal(const QString
contents.replace(oldIconStartPos, nextEolPos - oldIconStartPos,
' ' + iconAsBase64);
}
- MaemoGlobal::FileUpdate update(filePath);
+ Core::FileChangeBlocker update(filePath);
Utils::FileSaver saver(filePath);
saver.write(contents);
return saver.finalize(error);
@@ -646,7 +647,7 @@ bool AbstractDebBasedQt4MaemoTarget::setControlFieldValue(const QByteArray &fiel
return false;
QByteArray contents = reader.data();
if (adaptControlFileField(contents, fieldName, fieldValue)) {
- MaemoGlobal::FileUpdate update(controlFilePath());
+ Core::FileChangeBlocker update(controlFilePath());
Utils::FileSaver saver(controlFilePath());
saver.write(contents);
return saver.finalize();