aboutsummaryrefslogtreecommitdiff
path: root/src/demoserver.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'src/demoserver.cpp')
-rw-r--r--src/demoserver.cpp10
1 files changed, 7 insertions, 3 deletions
diff --git a/src/demoserver.cpp b/src/demoserver.cpp
index bc7da1c1..16d2b46e 100644
--- a/src/demoserver.cpp
+++ b/src/demoserver.cpp
@@ -12,6 +12,11 @@ DemoServer::DemoServer(QObject *parent) : QObject(parent)
connect(timer, &QTimer::timeout, this, &DemoServer::playback);
}
+void DemoServer::set_demo_file(QString filepath)
+{
+ filename = filepath;
+}
+
void DemoServer::start_server()
{
if (server_started) return;
@@ -35,13 +40,12 @@ void DemoServer::destroy_connection()
void DemoServer::accept_connection()
{
- QString path = QFileDialog::getOpenFileName(nullptr, tr("Load Demo"), "logs/", tr("Demo Files (*.demo)"));
- if (path.isEmpty())
+ if (filename.isEmpty())
{
destroy_connection();
return;
}
- load_demo(path);
+ load_demo(filename);
if (demo_data.isEmpty())
{