indentation

master
Marius Kintel 2015-03-03 00:41:34 -05:00
parent 9fd3aa5f17
commit 6e44f62472
1 changed files with 18 additions and 18 deletions

View File

@ -1246,25 +1246,25 @@ void MainWindow::updateRecentFileActions()
void MainWindow::show_examples()
{
bool found_example = false;
foreach (const QString &cat, UIUtils::exampleCategories()) {
bool found_example = false;
foreach (const QString &cat, UIUtils::exampleCategories()) {
QFileInfoList examples = UIUtils::exampleFiles(cat);
QMenu *menu = this->menuExamples->addMenu(gettext(cat.toStdString().c_str()));
foreach(const QFileInfo &ex, examples) {
QAction *openAct = new QAction(ex.fileName(), this);
connect(openAct, SIGNAL(triggered()), this, SLOT(actionOpenExample()));
menu->addAction(openAct);
openAct->setData(ex.canonicalFilePath());
found_example = true;
}
}
if (!found_example) {
delete this->menuExamples;
this->menuExamples = NULL;
}
QMenu *menu = this->menuExamples->addMenu(gettext(cat.toStdString().c_str()));
foreach(const QFileInfo &ex, examples) {
QAction *openAct = new QAction(ex.fileName(), this);
connect(openAct, SIGNAL(triggered()), this, SLOT(actionOpenExample()));
menu->addAction(openAct);
openAct->setData(ex.canonicalFilePath());
found_example = true;
}
}
if (!found_example) {
delete this->menuExamples;
this->menuExamples = NULL;
}
}
void MainWindow::actionOpenExample()