QTfrontend/net/tcpBase.cpp
author unc0rr
Fri, 04 Jan 2013 21:44:40 +0400
branchflibqtfrontend
changeset 8363 0b4ac686fc44
parent 8092 08960209db8c
parent 8310 a98c349bc06b
permissions -rw-r--r--
Merge from default
Ignore whitespace changes - Everywhere: Within whitespace: At end of lines:
184
f97a7a3dc8f6 - Update more headers
unc0rr
parents: 183
diff changeset
     1
/*
1066
1f1b3686a2b0 Update copyright headers a bit
unc0rr
parents: 533
diff changeset
     2
 * Hedgewars, a free turn based strategy game
486
7ea71cd3acd5 - Change proto version to 4
unc0rr
parents: 443
diff changeset
     3
 * Copyright (c) 2006-2007 Igor Ulyanov <iulyanov@gmail.com>
6952
7f70f37bbf08 license header year range adjustments
sheepluva
parents: 6700
diff changeset
     4
 * Copyright (c) 2004-2012 Andrey Korotaev <unC0Rr@gmail.com>
184
f97a7a3dc8f6 - Update more headers
unc0rr
parents: 183
diff changeset
     5
 *
f97a7a3dc8f6 - Update more headers
unc0rr
parents: 183
diff changeset
     6
 * This program is free software; you can redistribute it and/or modify
f97a7a3dc8f6 - Update more headers
unc0rr
parents: 183
diff changeset
     7
 * it under the terms of the GNU General Public License as published by
f97a7a3dc8f6 - Update more headers
unc0rr
parents: 183
diff changeset
     8
 * the Free Software Foundation; version 2 of the License
f97a7a3dc8f6 - Update more headers
unc0rr
parents: 183
diff changeset
     9
 *
f97a7a3dc8f6 - Update more headers
unc0rr
parents: 183
diff changeset
    10
 * This program is distributed in the hope that it will be useful,
f97a7a3dc8f6 - Update more headers
unc0rr
parents: 183
diff changeset
    11
 * but WITHOUT ANY WARRANTY; without even the implied warranty of
f97a7a3dc8f6 - Update more headers
unc0rr
parents: 183
diff changeset
    12
 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
f97a7a3dc8f6 - Update more headers
unc0rr
parents: 183
diff changeset
    13
 * GNU General Public License for more details.
f97a7a3dc8f6 - Update more headers
unc0rr
parents: 183
diff changeset
    14
 *
f97a7a3dc8f6 - Update more headers
unc0rr
parents: 183
diff changeset
    15
 * You should have received a copy of the GNU General Public License
f97a7a3dc8f6 - Update more headers
unc0rr
parents: 183
diff changeset
    16
 * along with this program; if not, write to the Free Software
f97a7a3dc8f6 - Update more headers
unc0rr
parents: 183
diff changeset
    17
 * Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA
f97a7a3dc8f6 - Update more headers
unc0rr
parents: 183
diff changeset
    18
 */
f97a7a3dc8f6 - Update more headers
unc0rr
parents: 183
diff changeset
    19
f97a7a3dc8f6 - Update more headers
unc0rr
parents: 183
diff changeset
    20
#include "tcpBase.h"
f97a7a3dc8f6 - Update more headers
unc0rr
parents: 183
diff changeset
    21
f97a7a3dc8f6 - Update more headers
unc0rr
parents: 183
diff changeset
    22
#include <QMessageBox>
f97a7a3dc8f6 - Update more headers
unc0rr
parents: 183
diff changeset
    23
#include <QList>
7794
ab7b94c03bc9 QMessageBox overhaul: unify buttons, style and appearance of info dialogs, fixing a few typos and return values along the way
koda
parents: 7673
diff changeset
    24
#include <QApplication>
184
f97a7a3dc8f6 - Update more headers
unc0rr
parents: 183
diff changeset
    25
#include <QImage>
8082
675372256a01 lotsa hackery to get frontend somehow link libengine...
koda
parents: 8070
diff changeset
    26
#include <QThread>
184
f97a7a3dc8f6 - Update more headers
unc0rr
parents: 183
diff changeset
    27
f97a7a3dc8f6 - Update more headers
unc0rr
parents: 183
diff changeset
    28
#include "hwconsts.h"
f97a7a3dc8f6 - Update more headers
unc0rr
parents: 183
diff changeset
    29
8082
675372256a01 lotsa hackery to get frontend somehow link libengine...
koda
parents: 8070
diff changeset
    30
#ifdef HWLIBRARY
675372256a01 lotsa hackery to get frontend somehow link libengine...
koda
parents: 8070
diff changeset
    31
extern "C" void Game(char**arguments);
8310
a98c349bc06b minor adjustments to libengine, moc is correctly created as definitions are set before calling it, params are better numbered and we don't subclass qthread but rather use moveToThread()
koda
parents: 8082
diff changeset
    32
extern "C" void GenLandPreview(int port);
8082
675372256a01 lotsa hackery to get frontend somehow link libengine...
koda
parents: 8070
diff changeset
    33
8310
a98c349bc06b minor adjustments to libengine, moc is correctly created as definitions are set before calling it, params are better numbered and we don't subclass qthread but rather use moveToThread()
koda
parents: 8082
diff changeset
    34
a98c349bc06b minor adjustments to libengine, moc is correctly created as definitions are set before calling it, params are better numbered and we don't subclass qthread but rather use moveToThread()
koda
parents: 8082
diff changeset
    35
EngineInstance::EngineInstance(QObject *parent)
a98c349bc06b minor adjustments to libengine, moc is correctly created as definitions are set before calling it, params are better numbered and we don't subclass qthread but rather use moveToThread()
koda
parents: 8082
diff changeset
    36
    : QObject(parent)
8082
675372256a01 lotsa hackery to get frontend somehow link libengine...
koda
parents: 8070
diff changeset
    37
{
8310
a98c349bc06b minor adjustments to libengine, moc is correctly created as definitions are set before calling it, params are better numbered and we don't subclass qthread but rather use moveToThread()
koda
parents: 8082
diff changeset
    38
    port = 0;
a98c349bc06b minor adjustments to libengine, moc is correctly created as definitions are set before calling it, params are better numbered and we don't subclass qthread but rather use moveToThread()
koda
parents: 8082
diff changeset
    39
}
8082
675372256a01 lotsa hackery to get frontend somehow link libengine...
koda
parents: 8070
diff changeset
    40
8310
a98c349bc06b minor adjustments to libengine, moc is correctly created as definitions are set before calling it, params are better numbered and we don't subclass qthread but rather use moveToThread()
koda
parents: 8082
diff changeset
    41
EngineInstance::~EngineInstance()
a98c349bc06b minor adjustments to libengine, moc is correctly created as definitions are set before calling it, params are better numbered and we don't subclass qthread but rather use moveToThread()
koda
parents: 8082
diff changeset
    42
{
a98c349bc06b minor adjustments to libengine, moc is correctly created as definitions are set before calling it, params are better numbered and we don't subclass qthread but rather use moveToThread()
koda
parents: 8082
diff changeset
    43
}
a98c349bc06b minor adjustments to libengine, moc is correctly created as definitions are set before calling it, params are better numbered and we don't subclass qthread but rather use moveToThread()
koda
parents: 8082
diff changeset
    44
a98c349bc06b minor adjustments to libengine, moc is correctly created as definitions are set before calling it, params are better numbered and we don't subclass qthread but rather use moveToThread()
koda
parents: 8082
diff changeset
    45
void EngineInstance::start()
8082
675372256a01 lotsa hackery to get frontend somehow link libengine...
koda
parents: 8070
diff changeset
    46
{
8310
a98c349bc06b minor adjustments to libengine, moc is correctly created as definitions are set before calling it, params are better numbered and we don't subclass qthread but rather use moveToThread()
koda
parents: 8082
diff changeset
    47
#if 0
a98c349bc06b minor adjustments to libengine, moc is correctly created as definitions are set before calling it, params are better numbered and we don't subclass qthread but rather use moveToThread()
koda
parents: 8082
diff changeset
    48
    char *args[11];
a98c349bc06b minor adjustments to libengine, moc is correctly created as definitions are set before calling it, params are better numbered and we don't subclass qthread but rather use moveToThread()
koda
parents: 8082
diff changeset
    49
    args[0] = "65000";  //ipcPort
a98c349bc06b minor adjustments to libengine, moc is correctly created as definitions are set before calling it, params are better numbered and we don't subclass qthread but rather use moveToThread()
koda
parents: 8082
diff changeset
    50
    args[1] = "1024";   //cScreenWidth
a98c349bc06b minor adjustments to libengine, moc is correctly created as definitions are set before calling it, params are better numbered and we don't subclass qthread but rather use moveToThread()
koda
parents: 8082
diff changeset
    51
    args[2] = "768";    //cScreenHeight
a98c349bc06b minor adjustments to libengine, moc is correctly created as definitions are set before calling it, params are better numbered and we don't subclass qthread but rather use moveToThread()
koda
parents: 8082
diff changeset
    52
    args[3] = "0";      //cReducedQuality
a98c349bc06b minor adjustments to libengine, moc is correctly created as definitions are set before calling it, params are better numbered and we don't subclass qthread but rather use moveToThread()
koda
parents: 8082
diff changeset
    53
    args[4] = "en.txt"; //cLocaleFName
a98c349bc06b minor adjustments to libengine, moc is correctly created as definitions are set before calling it, params are better numbered and we don't subclass qthread but rather use moveToThread()
koda
parents: 8082
diff changeset
    54
    args[5] = "koda";   //UserNick
a98c349bc06b minor adjustments to libengine, moc is correctly created as definitions are set before calling it, params are better numbered and we don't subclass qthread but rather use moveToThread()
koda
parents: 8082
diff changeset
    55
    args[6] = "1";      //SetSound
a98c349bc06b minor adjustments to libengine, moc is correctly created as definitions are set before calling it, params are better numbered and we don't subclass qthread but rather use moveToThread()
koda
parents: 8082
diff changeset
    56
    args[7] = "1";      //SetMusic
a98c349bc06b minor adjustments to libengine, moc is correctly created as definitions are set before calling it, params are better numbered and we don't subclass qthread but rather use moveToThread()
koda
parents: 8082
diff changeset
    57
    args[8] = "0";      //cAltDamage
a98c349bc06b minor adjustments to libengine, moc is correctly created as definitions are set before calling it, params are better numbered and we don't subclass qthread but rather use moveToThread()
koda
parents: 8082
diff changeset
    58
    args[9]= datadir->absolutePath().toAscii().data(); //cPathPrefix
a98c349bc06b minor adjustments to libengine, moc is correctly created as definitions are set before calling it, params are better numbered and we don't subclass qthread but rather use moveToThread()
koda
parents: 8082
diff changeset
    59
    args[10]= NULL;     //recordFileName
8082
675372256a01 lotsa hackery to get frontend somehow link libengine...
koda
parents: 8070
diff changeset
    60
    Game(args);
8310
a98c349bc06b minor adjustments to libengine, moc is correctly created as definitions are set before calling it, params are better numbered and we don't subclass qthread but rather use moveToThread()
koda
parents: 8082
diff changeset
    61
#endif
a98c349bc06b minor adjustments to libengine, moc is correctly created as definitions are set before calling it, params are better numbered and we don't subclass qthread but rather use moveToThread()
koda
parents: 8082
diff changeset
    62
    GenLandPreview(port);
8082
675372256a01 lotsa hackery to get frontend somehow link libengine...
koda
parents: 8070
diff changeset
    63
}
8310
a98c349bc06b minor adjustments to libengine, moc is correctly created as definitions are set before calling it, params are better numbered and we don't subclass qthread but rather use moveToThread()
koda
parents: 8082
diff changeset
    64
8082
675372256a01 lotsa hackery to get frontend somehow link libengine...
koda
parents: 8070
diff changeset
    65
#endif
675372256a01 lotsa hackery to get frontend somehow link libengine...
koda
parents: 8070
diff changeset
    66
184
f97a7a3dc8f6 - Update more headers
unc0rr
parents: 183
diff changeset
    67
QList<TCPBase*> srvsList;
f97a7a3dc8f6 - Update more headers
unc0rr
parents: 183
diff changeset
    68
419
fdeed9718e6b virtual destructors for tcpBase derived classes, readarray clear removed as unneeded
displacer
parents: 390
diff changeset
    69
TCPBase::~TCPBase()
fdeed9718e6b virtual destructors for tcpBase derived classes, readarray clear removed as unneeded
displacer
parents: 390
diff changeset
    70
{
8069
bb7671829935 - Only allow one engine instance running at the moment
unc0rr
parents: 7794
diff changeset
    71
    // make sure this object is not in the server list anymore
bb7671829935 - Only allow one engine instance running at the moment
unc0rr
parents: 7794
diff changeset
    72
    srvsList.removeOne(this);
419
fdeed9718e6b virtual destructors for tcpBase derived classes, readarray clear removed as unneeded
displacer
parents: 390
diff changeset
    73
}
fdeed9718e6b virtual destructors for tcpBase derived classes, readarray clear removed as unneeded
displacer
parents: 390
diff changeset
    74
8092
08960209db8c Try to use map preview facilities:
unc0rr
parents: 8082
diff changeset
    75
TCPBase::TCPBase(QObject *parent) :
8070
66bc20d089fc Okay, remove previous request only if it has same parent
unc0rr
parents: 8069
diff changeset
    76
    QObject(parent),
8092
08960209db8c Try to use map preview facilities:
unc0rr
parents: 8082
diff changeset
    77
    m_hasStarted(false)
184
f97a7a3dc8f6 - Update more headers
unc0rr
parents: 183
diff changeset
    78
{
7794
ab7b94c03bc9 QMessageBox overhaul: unify buttons, style and appearance of info dialogs, fixing a few typos and return values along the way
koda
parents: 7673
diff changeset
    79
184
f97a7a3dc8f6 - Update more headers
unc0rr
parents: 183
diff changeset
    80
}
f97a7a3dc8f6 - Update more headers
unc0rr
parents: 183
diff changeset
    81
f97a7a3dc8f6 - Update more headers
unc0rr
parents: 183
diff changeset
    82
void TCPBase::RealStart()
f97a7a3dc8f6 - Update more headers
unc0rr
parents: 183
diff changeset
    83
{
8092
08960209db8c Try to use map preview facilities:
unc0rr
parents: 8082
diff changeset
    84
    onEngineStart();
389
9628e69b609f Fix IPCSocket issues
unc0rr
parents: 381
diff changeset
    85
8082
675372256a01 lotsa hackery to get frontend somehow link libengine...
koda
parents: 8070
diff changeset
    86
#ifdef HWLIBRARY
8310
a98c349bc06b minor adjustments to libengine, moc is correctly created as definitions are set before calling it, params are better numbered and we don't subclass qthread but rather use moveToThread()
koda
parents: 8082
diff changeset
    87
    QThread *thread = new QThread;
a98c349bc06b minor adjustments to libengine, moc is correctly created as definitions are set before calling it, params are better numbered and we don't subclass qthread but rather use moveToThread()
koda
parents: 8082
diff changeset
    88
    EngineInstance *instance = new EngineInstance;
a98c349bc06b minor adjustments to libengine, moc is correctly created as definitions are set before calling it, params are better numbered and we don't subclass qthread but rather use moveToThread()
koda
parents: 8082
diff changeset
    89
    instance->port = IPCServer->serverPort();
a98c349bc06b minor adjustments to libengine, moc is correctly created as definitions are set before calling it, params are better numbered and we don't subclass qthread but rather use moveToThread()
koda
parents: 8082
diff changeset
    90
a98c349bc06b minor adjustments to libengine, moc is correctly created as definitions are set before calling it, params are better numbered and we don't subclass qthread but rather use moveToThread()
koda
parents: 8082
diff changeset
    91
    instance->moveToThread(thread);
a98c349bc06b minor adjustments to libengine, moc is correctly created as definitions are set before calling it, params are better numbered and we don't subclass qthread but rather use moveToThread()
koda
parents: 8082
diff changeset
    92
a98c349bc06b minor adjustments to libengine, moc is correctly created as definitions are set before calling it, params are better numbered and we don't subclass qthread but rather use moveToThread()
koda
parents: 8082
diff changeset
    93
    connect(thread, SIGNAL(started()), instance, SLOT(start(void)));
a98c349bc06b minor adjustments to libengine, moc is correctly created as definitions are set before calling it, params are better numbered and we don't subclass qthread but rather use moveToThread()
koda
parents: 8082
diff changeset
    94
    connect(instance, SIGNAL(finished()), thread, SLOT(quit()));
a98c349bc06b minor adjustments to libengine, moc is correctly created as definitions are set before calling it, params are better numbered and we don't subclass qthread but rather use moveToThread()
koda
parents: 8082
diff changeset
    95
    connect(instance, SIGNAL(finished()), instance, SLOT(deleteLater()));
a98c349bc06b minor adjustments to libengine, moc is correctly created as definitions are set before calling it, params are better numbered and we don't subclass qthread but rather use moveToThread()
koda
parents: 8082
diff changeset
    96
    connect(instance, SIGNAL(finished()), thread, SLOT(deleteLater()));
a98c349bc06b minor adjustments to libengine, moc is correctly created as definitions are set before calling it, params are better numbered and we don't subclass qthread but rather use moveToThread()
koda
parents: 8082
diff changeset
    97
    thread->start();
8082
675372256a01 lotsa hackery to get frontend somehow link libengine...
koda
parents: 8070
diff changeset
    98
#else
6616
f77bb02b669f astyle -C -S -L -N --style=allman --recursive "QTfrontend/*.cpp" "QTfrontend/*.h"
nemo
parents: 6060
diff changeset
    99
    QProcess * process;
8092
08960209db8c Try to use map preview facilities:
unc0rr
parents: 8082
diff changeset
   100
8069
bb7671829935 - Only allow one engine instance running at the moment
unc0rr
parents: 7794
diff changeset
   101
    process = new QProcess();
8092
08960209db8c Try to use map preview facilities:
unc0rr
parents: 8082
diff changeset
   102
    QStringList arguments = getArguments();
3697
d5b30d6373fc remove trailing spaces from end of line
koda
parents: 3157
diff changeset
   103
6616
f77bb02b669f astyle -C -S -L -N --style=allman --recursive "QTfrontend/*.cpp" "QTfrontend/*.h"
nemo
parents: 6060
diff changeset
   104
    // redirect everything written on stdout/stderr
f77bb02b669f astyle -C -S -L -N --style=allman --recursive "QTfrontend/*.cpp" "QTfrontend/*.h"
nemo
parents: 6060
diff changeset
   105
    if(isDevBuild)
f77bb02b669f astyle -C -S -L -N --style=allman --recursive "QTfrontend/*.cpp" "QTfrontend/*.h"
nemo
parents: 6060
diff changeset
   106
        process->setProcessChannelMode(QProcess::ForwardedChannels);
8069
bb7671829935 - Only allow one engine instance running at the moment
unc0rr
parents: 7794
diff changeset
   107
6616
f77bb02b669f astyle -C -S -L -N --style=allman --recursive "QTfrontend/*.cpp" "QTfrontend/*.h"
nemo
parents: 6060
diff changeset
   108
    process->start(bindir->absolutePath() + "/hwengine", arguments);
8082
675372256a01 lotsa hackery to get frontend somehow link libengine...
koda
parents: 8070
diff changeset
   109
#endif
8069
bb7671829935 - Only allow one engine instance running at the moment
unc0rr
parents: 7794
diff changeset
   110
    m_hasStarted = true;
184
f97a7a3dc8f6 - Update more headers
unc0rr
parents: 183
diff changeset
   111
}
f97a7a3dc8f6 - Update more headers
unc0rr
parents: 183
diff changeset
   112
8092
08960209db8c Try to use map preview facilities:
unc0rr
parents: 8082
diff changeset
   113
void TCPBase::clientDisconnected()
184
f97a7a3dc8f6 - Update more headers
unc0rr
parents: 183
diff changeset
   114
{
8092
08960209db8c Try to use map preview facilities:
unc0rr
parents: 8082
diff changeset
   115
    emit nextPlease();
7673
e06b83cbde74 fix a segfault related to tcp servers deleting themselves without removing themselves from the internal server list first.
sheepluva
parents: 7615
diff changeset
   116
6616
f77bb02b669f astyle -C -S -L -N --style=allman --recursive "QTfrontend/*.cpp" "QTfrontend/*.h"
nemo
parents: 6060
diff changeset
   117
    deleteLater();
184
f97a7a3dc8f6 - Update more headers
unc0rr
parents: 183
diff changeset
   118
}
f97a7a3dc8f6 - Update more headers
unc0rr
parents: 183
diff changeset
   119
8092
08960209db8c Try to use map preview facilities:
unc0rr
parents: 8082
diff changeset
   120
void TCPBase::iStart()
184
f97a7a3dc8f6 - Update more headers
unc0rr
parents: 183
diff changeset
   121
{
8092
08960209db8c Try to use map preview facilities:
unc0rr
parents: 8082
diff changeset
   122
    disconnect(srvsList.first(), SIGNAL(nextPlease()), this, SLOT(iStart()));
184
f97a7a3dc8f6 - Update more headers
unc0rr
parents: 183
diff changeset
   123
6616
f77bb02b669f astyle -C -S -L -N --style=allman --recursive "QTfrontend/*.cpp" "QTfrontend/*.h"
nemo
parents: 6060
diff changeset
   124
    RealStart();
184
f97a7a3dc8f6 - Update more headers
unc0rr
parents: 183
diff changeset
   125
}
f97a7a3dc8f6 - Update more headers
unc0rr
parents: 183
diff changeset
   126
8092
08960209db8c Try to use map preview facilities:
unc0rr
parents: 8082
diff changeset
   127
void TCPBase::start(bool couldCancelPreviousRequest)
184
f97a7a3dc8f6 - Update more headers
unc0rr
parents: 183
diff changeset
   128
{
6616
f77bb02b669f astyle -C -S -L -N --style=allman --recursive "QTfrontend/*.cpp" "QTfrontend/*.h"
nemo
parents: 6060
diff changeset
   129
    if(srvsList.isEmpty())
f77bb02b669f astyle -C -S -L -N --style=allman --recursive "QTfrontend/*.cpp" "QTfrontend/*.h"
nemo
parents: 6060
diff changeset
   130
    {
f77bb02b669f astyle -C -S -L -N --style=allman --recursive "QTfrontend/*.cpp" "QTfrontend/*.h"
nemo
parents: 6060
diff changeset
   131
        srvsList.push_back(this);
8092
08960209db8c Try to use map preview facilities:
unc0rr
parents: 8082
diff changeset
   132
8069
bb7671829935 - Only allow one engine instance running at the moment
unc0rr
parents: 7794
diff changeset
   133
        RealStart();
6616
f77bb02b669f astyle -C -S -L -N --style=allman --recursive "QTfrontend/*.cpp" "QTfrontend/*.h"
nemo
parents: 6060
diff changeset
   134
    }
f77bb02b669f astyle -C -S -L -N --style=allman --recursive "QTfrontend/*.cpp" "QTfrontend/*.h"
nemo
parents: 6060
diff changeset
   135
    else
f77bb02b669f astyle -C -S -L -N --style=allman --recursive "QTfrontend/*.cpp" "QTfrontend/*.h"
nemo
parents: 6060
diff changeset
   136
    {
8070
66bc20d089fc Okay, remove previous request only if it has same parent
unc0rr
parents: 8069
diff changeset
   137
        TCPBase * last = srvsList.last();
66bc20d089fc Okay, remove previous request only if it has same parent
unc0rr
parents: 8069
diff changeset
   138
        if(couldCancelPreviousRequest
66bc20d089fc Okay, remove previous request only if it has same parent
unc0rr
parents: 8069
diff changeset
   139
            && last->couldBeRemoved()
66bc20d089fc Okay, remove previous request only if it has same parent
unc0rr
parents: 8069
diff changeset
   140
            && (last->parent() == parent()))
8069
bb7671829935 - Only allow one engine instance running at the moment
unc0rr
parents: 7794
diff changeset
   141
        {
8070
66bc20d089fc Okay, remove previous request only if it has same parent
unc0rr
parents: 8069
diff changeset
   142
            srvsList.removeLast();
8069
bb7671829935 - Only allow one engine instance running at the moment
unc0rr
parents: 7794
diff changeset
   143
            last->deleteLater();
8092
08960209db8c Try to use map preview facilities:
unc0rr
parents: 8082
diff changeset
   144
            start(couldCancelPreviousRequest);
8069
bb7671829935 - Only allow one engine instance running at the moment
unc0rr
parents: 7794
diff changeset
   145
        } else
bb7671829935 - Only allow one engine instance running at the moment
unc0rr
parents: 7794
diff changeset
   146
        {
8092
08960209db8c Try to use map preview facilities:
unc0rr
parents: 8082
diff changeset
   147
            connect(srvsList.last(), SIGNAL(nextPlease()), this, SLOT(iStart()));
8069
bb7671829935 - Only allow one engine instance running at the moment
unc0rr
parents: 7794
diff changeset
   148
            srvsList.push_back(this);
bb7671829935 - Only allow one engine instance running at the moment
unc0rr
parents: 7794
diff changeset
   149
        }
6616
f77bb02b669f astyle -C -S -L -N --style=allman --recursive "QTfrontend/*.cpp" "QTfrontend/*.h"
nemo
parents: 6060
diff changeset
   150
    }
184
f97a7a3dc8f6 - Update more headers
unc0rr
parents: 183
diff changeset
   151
}
f97a7a3dc8f6 - Update more headers
unc0rr
parents: 183
diff changeset
   152
8069
bb7671829935 - Only allow one engine instance running at the moment
unc0rr
parents: 7794
diff changeset
   153
bool TCPBase::couldBeRemoved()
bb7671829935 - Only allow one engine instance running at the moment
unc0rr
parents: 7794
diff changeset
   154
{
bb7671829935 - Only allow one engine instance running at the moment
unc0rr
parents: 7794
diff changeset
   155
    return false;
bb7671829935 - Only allow one engine instance running at the moment
unc0rr
parents: 7794
diff changeset
   156
}