src/toolsets/algorithmtoolset.cpp

changeset 1156
c20ee66b6705
parent 1149
502c866b8512
child 1161
e6a5ff67c057
equal deleted inserted replaced
1155:b0e004c8e3a4 1156:c20ee66b6705
15 * You should have received a copy of the GNU General Public License 15 * You should have received a copy of the GNU General Public License
16 * along with this program. If not, see <http://www.gnu.org/licenses/>. 16 * along with this program. If not, see <http://www.gnu.org/licenses/>.
17 */ 17 */
18 18
19 #include <limits> 19 #include <limits>
20 #include <QBoxLayout>
21 #include <QCheckBox>
22 #include <QDir> 20 #include <QDir>
23 #include <QInputDialog> 21 #include <QInputDialog>
24 #include <QSpinBox> 22 #include <QMessageBox>
25 #include "../mainwindow.h" 23 #include "../mainwindow.h"
26 #include "../main.h" 24 #include "../main.h"
27 #include "../lddocument.h" 25 #include "../lddocument.h"
28 #include "../miscallenous.h" 26 #include "../miscallenous.h"
29 #include "../radioGroup.h" 27 #include "../radioGroup.h"
474 472
475 if (topdirname != "s") 473 if (topdirname != "s")
476 { 474 {
477 QString desiredPath = subdirname + "/s"; 475 QString desiredPath = subdirname + "/s";
478 QString title = tr ("Create subfile directory?"); 476 QString title = tr ("Create subfile directory?");
479 QString text = format (tr ("The directory <b>%1</b> is suggested for " 477 QString text = format(tr("The directory <b>%1</b> is suggested for subfiles. "
480 "subfiles. This directory does not exist, create it?"), desiredPath); 478 "This directory does not exist, do you want to create it?"), desiredPath);
481 479
482 if (QDir (desiredPath).exists() or Confirm (title, text)) 480 if (QDir(desiredPath).exists()
481 or QMessageBox::question(m_window, title, text, (QMessageBox::Yes | QMessageBox::No), QMessageBox::No) == QMessageBox::Yes)
483 { 482 {
484 subdirname = desiredPath; 483 subdirname = desiredPath;
485 QDir().mkpath (subdirname); 484 QDir().mkpath(subdirname);
486 } 485 }
487 else 486 else
488 return; 487 return;
489 } 488 }
490 489

mercurial