Implement load-log-by-commandline behaviour

This commit is contained in:
baldurk
2015-07-10 16:38:37 +02:00
parent 47d509749b
commit 4f5673941d
3 changed files with 14 additions and 3 deletions
+12 -1
View File
@@ -5,6 +5,7 @@
#include <QTimer>
#include <QMessageBox>
#include <QMetaObject>
#include <QFileInfo>
Core::Core(QString paramFilename, QString remoteHost, uint32_t remoteIdent, bool temp)
{
@@ -14,8 +15,18 @@ Core::Core(QString paramFilename, QString remoteHost, uint32_t remoteIdent, bool
memset(&m_APIProps, 0, sizeof(m_APIProps));
m_MainWindow = new MainWindow(this, paramFilename, remoteHost, remoteIdent, temp);
m_MainWindow = new MainWindow(this);
m_MainWindow->show();
if(!paramFilename.isEmpty())
{
QFileInfo fi(paramFilename);
if(fi.suffix() == "rdc")
{
LoadLogfile(paramFilename, temp);
}
}
}
Core::~Core()
+1 -1
View File
@@ -8,7 +8,7 @@
#include "Code/Core.h"
MainWindow::MainWindow(Core *core, QString paramFilename, QString remoteHost, uint32_t remoteIdent, bool temp) :
MainWindow::MainWindow(Core *core) :
QMainWindow(NULL),
ui(new Ui::MainWindow),
m_Core(core)
+1 -1
View File
@@ -15,7 +15,7 @@ class MainWindow : public QMainWindow
Q_OBJECT
public:
explicit MainWindow(Core *core, QString paramFilename, QString remoteHost, uint32_t remoteIdent, bool temp);
explicit MainWindow(Core *core);
~MainWindow();
private slots: