src/settingseditor/librarieseditor.cpp

changeset 201
5d201ee4a9c3
parent 41
0abada2a9802
child 206
654661eab7f3
equal deleted inserted replaced
200:ca23936b455b 201:5d201ee4a9c3
48 const QDir dir{this->ui.newLibraryPath->text()}; 48 const QDir dir{this->ui.newLibraryPath->text()};
49 if (not dir.exists()) 49 if (not dir.exists())
50 { 50 {
51 QMessageBox::critical(this, 51 QMessageBox::critical(this,
52 tr("Library does not exist"), 52 tr("Library does not exist"),
53 utility::format( 53 format(
54 tr("The directory %1 does not exist."), 54 tr("The directory %1 does not exist."),
55 utility::quoted(dir.path()))); 55 quoted(dir.path())));
56 } 56 }
57 else 57 else
58 { 58 {
59 if (not dir.isReadable()) 59 if (not dir.isReadable())
60 { 60 {
61 QMessageBox::warning(this, 61 QMessageBox::warning(this,
62 tr("Unreadable library"), 62 tr("Unreadable library"),
63 utility::format( 63 format(
64 tr("The directory %1 cannot be read."), 64 tr("The directory %1 cannot be read."),
65 utility::quoted(dir.path()))); 65 quoted(dir.path())));
66 } 66 }
67 this->libraries.addLibrary({Library::OfficialLibrary, dir}); 67 this->libraries.addLibrary({Library::OfficialLibrary, dir});
68 this->ui.newLibraryPath->clear(); 68 this->ui.newLibraryPath->clear();
69 } 69 }
70 } 70 }

mercurial