From 3b6fbd067e0760fc3ddf2503905f2b81b3ea0e23 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Daniel=20Marjam=C3=A4ki?= Date: Mon, 1 Jan 2018 10:52:51 +0100 Subject: [PATCH] triage: small tweaks --- tools/triage/triage/codeeditor.h | 10 ++++------ tools/triage/triage/mainwindow.cpp | 28 ++++++++++++++-------------- tools/triage/triage/mainwindow.h | 5 ++--- 3 files changed, 20 insertions(+), 23 deletions(-) diff --git a/tools/triage/triage/codeeditor.h b/tools/triage/triage/codeeditor.h index 0165f035f..4dae5c36a 100644 --- a/tools/triage/triage/codeeditor.h +++ b/tools/triage/triage/codeeditor.h @@ -12,12 +12,11 @@ class QWidget; class LineNumberArea; -class CodeEditor : public QPlainTextEdit -{ +class CodeEditor : public QPlainTextEdit { Q_OBJECT public: - CodeEditor(QWidget *parent = 0); + explicit CodeEditor(QWidget *parent = 0); void lineNumberAreaPaintEvent(QPaintEvent *event); int lineNumberAreaWidth(); @@ -35,10 +34,9 @@ private: }; -class LineNumberArea : public QWidget -{ +class LineNumberArea : public QWidget { public: - LineNumberArea(CodeEditor *editor) : QWidget(editor) { + explicit LineNumberArea(CodeEditor *editor) : QWidget(editor) { codeEditor = editor; } diff --git a/tools/triage/triage/mainwindow.cpp b/tools/triage/triage/mainwindow.cpp index e974887e0..7ea31e2f6 100644 --- a/tools/triage/triage/mainwindow.cpp +++ b/tools/triage/triage/mainwindow.cpp @@ -55,25 +55,25 @@ void MainWindow::showResult(QListWidgetItem *item) QProcess process; process.setWorkingDirectory(WORK_FOLDER); - // Download archive if (!QFileInfo(WORK_FOLDER + '/' + archiveName).exists()) { + // Download archive process.start("wget", QStringList()<code->setFocus(); diff --git a/tools/triage/triage/mainwindow.h b/tools/triage/triage/mainwindow.h index 69a18544f..e07528685 100644 --- a/tools/triage/triage/mainwindow.h +++ b/tools/triage/triage/mainwindow.h @@ -5,11 +5,10 @@ #include namespace Ui { -class MainWindow; + class MainWindow; } -class MainWindow : public QMainWindow -{ +class MainWindow : public QMainWindow { Q_OBJECT public: