Changeset View
Changeset View
Standalone View
Standalone View
src/buffer/katesecuretextbuffer.cpp
Show First 20 Lines • Show All 133 Lines • ▼ Show 20 Line(s) | 127 | #ifndef Q_OS_WIN | |||
---|---|---|---|---|---|
134 | } | 134 | } | ||
135 | #else | 135 | #else | ||
136 | // no-op for windows | 136 | // no-op for windows | ||
137 | #endif | 137 | #endif | ||
138 | } | 138 | } | ||
139 | 139 | | |||
140 | bool SecureTextBuffer::moveFile(const QString &sourceFile, const QString &targetFile) | 140 | bool SecureTextBuffer::moveFile(const QString &sourceFile, const QString &targetFile) | ||
141 | { | 141 | { | ||
142 | #ifndef Q_OS_WIN | 142 | #if !defined(Q_OS_WIN) && !defined(Q_OS_ANDROID) | ||
143 | const int result = std::rename(QFile::encodeName(sourceFile).constData(), QFile::encodeName(targetFile).constData()); | 143 | const int result = std::rename(QFile::encodeName(sourceFile).constData(), QFile::encodeName(targetFile).constData()); | ||
144 | if (result == 0) { | 144 | if (result == 0) { | ||
145 | syncToDisk(QFile(targetFile).handle()); | 145 | syncToDisk(QFile(targetFile).handle()); | ||
146 | return true; | 146 | return true; | ||
147 | } | 147 | } | ||
148 | return false; | 148 | return false; | ||
149 | #else | 149 | #else | ||
150 | // use racy fallback for windows | 150 | // use racy fallback for windows | ||
Show All 18 Lines |