mirror of
https://gitlab.com/pholy/OSCAR-code.git
synced 2025-04-22 05:30:44 +00:00
Shorten file dialog message, fix Error message box button
This commit is contained in:
parent
be2eafb4fd
commit
6b58204291
@ -147,7 +147,8 @@ bool migrateFromSH(QString destDir) {
|
|||||||
|
|
||||||
while (selectingFolder) {
|
while (selectingFolder) {
|
||||||
datadir = QFileDialog::getExistingDirectory(nullptr,
|
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);
|
homeDocs, QFileDialog::ShowDirsOnly);
|
||||||
qDebug() << "Migration folder selected: " + datadir;
|
qDebug() << "Migration folder selected: " + datadir;
|
||||||
if (datadir.isEmpty()) {
|
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
|
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.
|
// 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.") +
|
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
|
continue; // Nope, don't use it, go around the loop again
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
Loading…
Reference in New Issue
Block a user