triage: small tweaks
This commit is contained in:
parent
4c490b599b
commit
3b6fbd067e
|
@ -12,12 +12,11 @@ class QWidget;
|
||||||
class LineNumberArea;
|
class LineNumberArea;
|
||||||
|
|
||||||
|
|
||||||
class CodeEditor : public QPlainTextEdit
|
class CodeEditor : public QPlainTextEdit {
|
||||||
{
|
|
||||||
Q_OBJECT
|
Q_OBJECT
|
||||||
|
|
||||||
public:
|
public:
|
||||||
CodeEditor(QWidget *parent = 0);
|
explicit CodeEditor(QWidget *parent = 0);
|
||||||
|
|
||||||
void lineNumberAreaPaintEvent(QPaintEvent *event);
|
void lineNumberAreaPaintEvent(QPaintEvent *event);
|
||||||
int lineNumberAreaWidth();
|
int lineNumberAreaWidth();
|
||||||
|
@ -35,10 +34,9 @@ private:
|
||||||
};
|
};
|
||||||
|
|
||||||
|
|
||||||
class LineNumberArea : public QWidget
|
class LineNumberArea : public QWidget {
|
||||||
{
|
|
||||||
public:
|
public:
|
||||||
LineNumberArea(CodeEditor *editor) : QWidget(editor) {
|
explicit LineNumberArea(CodeEditor *editor) : QWidget(editor) {
|
||||||
codeEditor = editor;
|
codeEditor = editor;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -55,12 +55,11 @@ void MainWindow::showResult(QListWidgetItem *item)
|
||||||
QProcess process;
|
QProcess process;
|
||||||
process.setWorkingDirectory(WORK_FOLDER);
|
process.setWorkingDirectory(WORK_FOLDER);
|
||||||
|
|
||||||
// Download archive
|
|
||||||
if (!QFileInfo(WORK_FOLDER + '/' + archiveName).exists()) {
|
if (!QFileInfo(WORK_FOLDER + '/' + archiveName).exists()) {
|
||||||
|
// Download archive
|
||||||
process.start("wget", QStringList()<<url);
|
process.start("wget", QStringList()<<url);
|
||||||
if (!process.waitForFinished(-1))
|
if (!process.waitForFinished(-1))
|
||||||
return;
|
return;
|
||||||
}
|
|
||||||
|
|
||||||
// Unpack archive
|
// Unpack archive
|
||||||
QStringList args;
|
QStringList args;
|
||||||
|
@ -74,6 +73,7 @@ void MainWindow::showResult(QListWidgetItem *item)
|
||||||
process.start("tar", args);
|
process.start("tar", args);
|
||||||
if (!process.waitForFinished(-1))
|
if (!process.waitForFinished(-1))
|
||||||
return;
|
return;
|
||||||
|
}
|
||||||
|
|
||||||
// Open file
|
// Open file
|
||||||
ui->code->setFocus();
|
ui->code->setFocus();
|
||||||
|
|
|
@ -5,11 +5,10 @@
|
||||||
#include <QListWidgetItem>
|
#include <QListWidgetItem>
|
||||||
|
|
||||||
namespace Ui {
|
namespace Ui {
|
||||||
class MainWindow;
|
class MainWindow;
|
||||||
}
|
}
|
||||||
|
|
||||||
class MainWindow : public QMainWindow
|
class MainWindow : public QMainWindow {
|
||||||
{
|
|
||||||
Q_OBJECT
|
Q_OBJECT
|
||||||
|
|
||||||
public:
|
public:
|
||||||
|
|
Loading…
Reference in New Issue