triage: small tweaks
This commit is contained in:
parent
4c490b599b
commit
3b6fbd067e
|
@ -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;
|
||||
}
|
||||
|
||||
|
|
|
@ -55,12 +55,11 @@ 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()<<url);
|
||||
if (!process.waitForFinished(-1))
|
||||
return;
|
||||
}
|
||||
|
||||
// Unpack archive
|
||||
QStringList args;
|
||||
|
@ -74,6 +73,7 @@ void MainWindow::showResult(QListWidgetItem *item)
|
|||
process.start("tar", args);
|
||||
if (!process.waitForFinished(-1))
|
||||
return;
|
||||
}
|
||||
|
||||
// Open file
|
||||
ui->code->setFocus();
|
||||
|
|
|
@ -5,11 +5,10 @@
|
|||
#include <QListWidgetItem>
|
||||
|
||||
namespace Ui {
|
||||
class MainWindow;
|
||||
class MainWindow;
|
||||
}
|
||||
|
||||
class MainWindow : public QMainWindow
|
||||
{
|
||||
class MainWindow : public QMainWindow {
|
||||
Q_OBJECT
|
||||
|
||||
public:
|
||||
|
|
Loading…
Reference in New Issue