[prev in list] [next in list] [prev in thread] [next in thread]
List: kde-commits
Subject: [kate] part/swapfile: clearer naming: m_modified -> m_needSync
From: Dominik Haumann <dhdev () gmx ! de>
Date: 2012-06-30 12:31:49
Message-ID: 20120630123149.30E9CA60A6 () git ! kde ! org
[Download RAW message or body]
Git commit 92ede62e94fd4493c58b6cd9d5fe83b745f98b7c by Dominik Haumann.
Committed on 30/06/2012 at 14:28.
Pushed by dhaumann into branch 'master'.
clearer naming: m_modified -> m_needSync
M +8 -8 part/swapfile/kateswapfile.cpp
M +1 -1 part/swapfile/kateswapfile.h
http://commits.kde.org/kate/92ede62e94fd4493c58b6cd9d5fe83b745f98b7c
diff --git a/part/swapfile/kateswapfile.cpp b/part/swapfile/kateswapfile.cpp
index 909f654..3da2560 100644
--- a/part/swapfile/kateswapfile.cpp
+++ b/part/swapfile/kateswapfile.cpp
@@ -51,7 +51,7 @@ SwapFile::SwapFile(KateDocument *document)
, m_document(document)
, m_trackingEnabled(false)
, m_recovered(false)
- , m_modified(false)
+ , m_needSync(false)
{
// fixed version of serialisation
m_stream.setVersion (QDataStream::Qt_4_6);
@@ -291,7 +291,7 @@ bool SwapFile::recover(QDataStream& stream)
void SwapFile::fileSaved(const QString&)
{
- m_modified = false;
+ m_needSync = false;
// remove old swap file (e.g. if a file A was "saved as" B)
removeSwapFile();
@@ -349,7 +349,7 @@ void SwapFile::wrapLine (const KTextEditor::Cursor &position)
// format: qint8, int, int
m_stream << EA_WrapLine << position.line() << position.column();
- m_modified = true;
+ m_needSync = true;
}
void SwapFile::unwrapLine (int line)
@@ -361,7 +361,7 @@ void SwapFile::unwrapLine (int line)
// format: qint8, int
m_stream << EA_UnwrapLine << line;
- m_modified = true;
+ m_needSync = true;
}
void SwapFile::insertText (const KTextEditor::Cursor &position, const QString &text)
@@ -373,7 +373,7 @@ void SwapFile::insertText (const KTextEditor::Cursor &position, const QString &t
// format: qint8, int, int, bytearray
m_stream << EA_InsertText << position.line() << position.column() << text.toUtf8 ();
- m_modified = true;
+ m_needSync = true;
}
void SwapFile::removeText (const KTextEditor::Range &range)
@@ -388,7 +388,7 @@ void SwapFile::removeText (const KTextEditor::Range &range)
<< range.start().line() << range.start().column()
<< range.end().column();
- m_modified = true;
+ m_needSync = true;
}
bool SwapFile::shouldRecover() const
@@ -456,8 +456,8 @@ QTimer* SwapFile::syncTimer()
void SwapFile::writeFileToDisk()
{
- if (m_modified) {
- m_modified = false;
+ if (m_needSync) {
+ m_needSync = false;
#ifndef Q_OS_WIN
// ensure that the file is written to disk
diff --git a/part/swapfile/kateswapfile.h b/part/swapfile/kateswapfile.h
index 47c5b2b..2a10af4 100644
--- a/part/swapfile/kateswapfile.h
+++ b/part/swapfile/kateswapfile.h
@@ -89,7 +89,7 @@ class KATEPART_TESTS_EXPORT SwapFile : public QObject
QDataStream m_stream;
QFile m_swapfile;
bool m_recovered;
- bool m_modified;
+ bool m_needSync;
static QTimer *s_timer;
protected Q_SLOTS:
[prev in list] [next in list] [prev in thread] [next in thread]
Configure |
About |
News |
Add a list |
Sponsored by KoreLogic