indentation

master
Marius Kintel 2015-03-03 23:49:34 -05:00
parent e24fb72092
commit 4b45893575
1 changed files with 21 additions and 22 deletions

View File

@ -178,7 +178,7 @@ MainWindow::MainWindow(const QString &filename)
setupUi(this);
editorDockTitleWidget = new QWidget();
consoleDockTitleWidget = new QWidget();
consoleDockTitleWidget = new QWidget();
this->editorDock->setConfigKey("view/hideEditor");
this->editorDock->setAction(this->viewActionHideEditor);
@ -195,11 +195,10 @@ MainWindow::MainWindow(const QString &filename)
#ifdef USE_SCINTILLA_EDITOR
if (useScintilla) {
editor = new ScintillaEditor(editorDockContents);
}
else
#endif
editor = new LegacyEditor(editorDockContents);
editor = new LegacyEditor(editorDockContents);
Preferences::create(editor->colorSchemes());
@ -783,7 +782,7 @@ void MainWindow::setFileName(const QString &filename)
} else {
QFileInfo fileinfo(filename);
this->fileName = fileinfo.exists() ? fileinfo.absoluteFilePath() : fileinfo.fileName();
QString fn =fileinfo.absoluteFilePath();
QString fn =fileinfo.absoluteFilePath();
setWindowFilePath(fn);
QDir::setCurrent(fileinfo.dir().absolutePath());
@ -1247,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()