Shorten file dialog message, fix Error message box button

This commit is contained in:
Phil Olynyk 2019-03-28 22:31:25 -04:00
parent be2eafb4fd
commit 6b58204291

View File

@ -147,7 +147,8 @@ bool migrateFromSH(QString destDir) {
while (selectingFolder) {
datadir = QFileDialog::getExistingDirectory(nullptr,
QObject::tr("Choose the SleepyHead data folder to migrate\nor CANCEL to start OSCAR without migrating SleepyHead data."),
QObject::tr("Choose the SleepyHead data folder to migrate")+" "+
QObject::tr("or CANCEL to skip migration."),
homeDocs, QFileDialog::ShowDirsOnly);
qDebug() << "Migration folder selected: " + datadir;
if (datadir.isEmpty()) {
@ -160,9 +161,9 @@ bool migrateFromSH(QString destDir) {
if (!file.exists() || !dirP.exists()) { // It doesn't have a Preferences.xml file or a Profiles directory in it
// Not a new directory.. nag the user.
if (QMessageBox::question(nullptr, STR_MessageBox_Warning,
if (QMessageBox::warning(nullptr, STR_MessageBox_Error,
QObject::tr("The folder you chose does not contain valid SleepyHead data.") +
"\n\n"+QObject::tr("You cannot use this folder:")+" " + datadir )) {
"\n\n"+QObject::tr("You cannot use this folder:")+" " + datadir ), QMessageBox::Ok) {
continue; // Nope, don't use it, go around the loop again
}
}