File tree Expand file tree Collapse file tree 3 files changed +12
-2
lines changed
Expand file tree Collapse file tree 3 files changed +12
-2
lines changed Original file line number Diff line number Diff line change @@ -105,6 +105,15 @@ bool NotepadNextApplication::init()
105105 settings = new ApplicationSettings (this );
106106
107107 if (parser.isSet (" reset-settings" )) {
108+ QFileInfo original (settings->fileName ());
109+ QString backup = original.canonicalPath () + " /backup." + original.suffix ();
110+
111+ qInfo (" Resetting application settings" );
112+ qInfo (" Backuping up %s to %s" , qUtf8Printable (settings->fileName ()), qUtf8Printable (backup));
113+
114+ QFile::remove (backup);
115+ bool renameSuccessfull = QFile::rename (settings->fileName (), backup);
116+
108117 settings->clear ();
109118 }
110119
Original file line number Diff line number Diff line change @@ -1638,7 +1638,7 @@ void MainWindow::applyStyleSheet()
16381638
16391639 QString sheet;
16401640 QFile f (" :/stylesheets/npp.css" );
1641- qInfo () << " Loading stylesheet: " << f.fileName ();
1641+ qInfo () << " Loading stylesheet:" << f.fileName ();
16421642
16431643 f.open (QFile::ReadOnly);
16441644 sheet = f.readAll ();
@@ -1649,7 +1649,7 @@ void MainWindow::applyStyleSheet()
16491649 QString fullPath = QDir (directoryPath).filePath (" custom.css" );
16501650 if (QFile::exists (fullPath)) {
16511651 QFile custom (fullPath);
1652- qInfo () << " Loading stylesheet: " << custom.fileName ();
1652+ qInfo () << " Loading stylesheet:" << custom.fileName ();
16531653
16541654 custom.open (QFile::ReadOnly);
16551655 sheet += custom.readAll ();
Original file line number Diff line number Diff line change @@ -58,6 +58,7 @@ int main(int argc, char *argv[])
5858 qInfo (" CPU: %s" , qUtf8Printable (QSysInfo::currentCpuArchitecture ()));
5959 qInfo (" File Path: %s" , qUtf8Printable (QApplication::applicationFilePath ()));
6060 qInfo (" Arguments: %s" , qUtf8Printable (app.arguments ().join (' ' )));
61+ qInfo (" Config File: %s" , qUtf8Printable (ApplicationSettings ().fileName ()));
6162 qInfo (" =============================" );
6263
6364 if (app.isPrimary ()) {
You can’t perform that action at this time.
0 commit comments