From 59a05f16a77fd2497d192daeab249aa3a782c7a7 Mon Sep 17 00:00:00 2001 From: nowrep Date: Wed, 1 Aug 2012 23:02:04 +0200 Subject: [PATCH] Fixed issue with showing warning after creating new profile - warning noticing about unknown profile version --- src/lib/preferences/preferences.cpp | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/src/lib/preferences/preferences.cpp b/src/lib/preferences/preferences.cpp index 68d5fc96e..85c58a4a9 100644 --- a/src/lib/preferences/preferences.cpp +++ b/src/lib/preferences/preferences.cpp @@ -684,10 +684,16 @@ void Preferences::createProfile() QMessageBox::warning(this, tr("Error!"), tr("Cannot create profile directory!")); return; } + dir.cd(name); QFile(":data/browsedata.db").copy(dir.absolutePath() + "/browsedata.db"); QFile(dir.absolutePath() + "/browsedata.db").setPermissions(QFile::ReadUser | QFile::WriteUser); + QFile versionFile(dir.absolutePath() + "/version"); + versionFile.open(QFile::WriteOnly); + versionFile.write(QupZilla::VERSION.toUtf8()); + versionFile.close(); + ui->startProfile->insertItem(0, name); ui->startProfile->setCurrentIndex(0); }