From f593b147639b9a7a6d5b62972b0a63ff3614c667 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Matthias=20M=C3=B6ller?= Date: Wed, 4 Feb 2015 12:54:56 +0000 Subject: [PATCH] add nogui support closes #2384 git-svn-id: http://www.openflipper.org/svnrepo/OpenFlipper/branches/Free@20232 383ad7c9-94d9-4d36-a494-682f7c89f535 --- RemesherPlugin.cc | 13 ++++++++----- RemesherPlugin.hh | 2 ++ 2 files changed, 10 insertions(+), 5 deletions(-) diff --git a/RemesherPlugin.cc b/RemesherPlugin.cc index 1ff0249..4b6a22a 100644 --- a/RemesherPlugin.cc +++ b/RemesherPlugin.cc @@ -61,17 +61,20 @@ RemesherPlugin::RemesherPlugin() : progress_(0) { - progress_ = new ProgressEmitter(); + if ( OpenFlipper::Options::gui() ) { + progress_ = new ProgressEmitter(); - connect(progress_, SIGNAL(signalJobState(QString,int)), this, SIGNAL(setJobState(QString,int)), Qt::QueuedConnection); - connect(progress_, SIGNAL(changeDescription(QString,QString)), this, SIGNAL(setJobDescription(QString,QString)), Qt::QueuedConnection); + connect(progress_, SIGNAL(signalJobState(QString,int)), this, SIGNAL(setJobState(QString,int)), Qt::QueuedConnection); + connect(progress_, SIGNAL(changeDescription(QString,QString)), this, SIGNAL(setJobDescription(QString,QString)), Qt::QueuedConnection); + } } // ---------------------------------------------------------------------------------------- RemesherPlugin::~RemesherPlugin() { - - delete progress_; + if ( OpenFlipper::Options::gui() ) { + delete progress_; + } } // ---------------------------------------------------------------------------------------- diff --git a/RemesherPlugin.hh b/RemesherPlugin.hh index 9a4075b..1a0d7d2 100644 --- a/RemesherPlugin.hh +++ b/RemesherPlugin.hh @@ -204,6 +204,8 @@ public slots: public slots: QString version() { return QString("1.0"); }; + + void noguiSupported( ) {} ; }; #endif //ADVANCEDREMESHERPLUGIN_HH -- GitLab