aboutsummaryrefslogtreecommitdiff
path: root/libLumina/LuminaUtils.cpp
diff options
context:
space:
mode:
authorKen Moore <ken@pcbsd.org>2014-10-14 16:01:39 -0400
committerKen Moore <ken@pcbsd.org>2014-10-14 16:01:39 -0400
commit6c491c85494cdcbc750491817b68396775e9b04e (patch)
tree2c3ac506fd02e73bef5240a06a648ec6f5dc03dc /libLumina/LuminaUtils.cpp
parentLarge update to the Lumina project: provide full theming capabilities. (diff)
downloadlumina-6c491c85494cdcbc750491817b68396775e9b04e.tar.gz
lumina-6c491c85494cdcbc750491817b68396775e9b04e.tar.bz2
lumina-6c491c85494cdcbc750491817b68396775e9b04e.zip
Finish up the rest of the new Lumina Theme engine and the utilities for editing those themes in lumina-config. Also tag Lumina version 0.7.0 with this change.
Diffstat (limited to 'libLumina/LuminaUtils.cpp')
-rw-r--r--libLumina/LuminaUtils.cpp4
1 files changed, 2 insertions, 2 deletions
diff --git a/libLumina/LuminaUtils.cpp b/libLumina/LuminaUtils.cpp
index 46c2e26c..6f91082c 100644
--- a/libLumina/LuminaUtils.cpp
+++ b/libLumina/LuminaUtils.cpp
@@ -54,9 +54,9 @@ QStringList LUtils::readFile(QString filepath){
bool LUtils::writeFile(QString filepath, QStringList contents, bool overwrite){
QFile file(filepath);
- QFile::OpenMode mode = overwrite ? (QIODevice::WriteOnly | QIODevice::Text | QIODevice::Truncate) : (QIODevice::WriteOnly | QIODevice::Text);
+ if(file.exists() && !overwrite){ return false; }
bool ok = false;
- if(file.open( mode ) ){
+ if( file.open(QIODevice::WriteOnly | QIODevice::Truncate) ){
QTextStream out(&file);
out << contents.join("\n");
file.close();
bgstack15