server sleep

This commit is contained in:
Volker Fischer 2006-02-18 12:19:27 +00:00
parent 3615d9e0b7
commit a79354dc99
4 changed files with 16 additions and 5 deletions

View file

@ -115,6 +115,7 @@ int main ( int argc, char** argv )
else
{
// only start application without using the GUI
qDebug ( CAboutDlg::GetVersionAndNameStr () );
app.exec ();
}
}

View file

@ -48,7 +48,7 @@ void CServer::Start ()
/* init time for response time evaluation */
TimeLastBlock = QTime::currentTime ();
qDebug("Server started");
qDebug("Server started");
}
}
@ -56,6 +56,8 @@ void CServer::Stop ()
{
/* stop main timer */
Timer.stop ();
qDebug("Server stopped");
}
void CServer::OnTimer ()
@ -103,8 +105,6 @@ void CServer::OnTimer ()
// Disable server if no clients are connected. In this case the server
// does not consume any significant CPU when no client is connected.
Stop ();
qDebug("Server stopped");
}
}

View file

@ -254,14 +254,22 @@ CAboutDlg::CAboutDlg(QWidget* parent, const char* name, bool modal, WFlags f)
"</center><br>");
/* Set version number in about dialog */
TextLabelVersion->setText(GetVersionAndNameStr());
}
QString CAboutDlg::GetVersionAndNameStr()
{
QString strVersionText;
// name, short description and GPL hint
strVersionText = "<center><b>" + tr("llcon, Version ");
strVersionText += VERSION;
strVersionText += "</b><br> " +
tr("llcon, Low-Latency (Internet) Connection") + "<br>";
strVersionText += tr("Under the GNU General Public License (GPL)") +
"</center>";
TextLabelVersion->setText(strVersionText);
return strVersionText;
}

View file

@ -303,6 +303,8 @@ class CAboutDlg : public CAboutDlgBase
public:
CAboutDlg(QWidget* parent = 0, const char* name = 0, bool modal = FALSE,
WFlags f = 0);
static QString GetVersionAndNameStr();
};