From 6c491c85494cdcbc750491817b68396775e9b04e Mon Sep 17 00:00:00 2001 From: Ken Moore Date: Tue, 14 Oct 2014 16:01:39 -0400 Subject: 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. --- libLumina/LuminaUtils.cpp | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'libLumina/LuminaUtils.cpp') 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(); -- cgit