server sleep
This commit is contained in:
parent
3615d9e0b7
commit
a79354dc99
4 changed files with 16 additions and 5 deletions
|
@ -114,7 +114,8 @@ int main ( int argc, char** argv )
|
|||
}
|
||||
else
|
||||
{
|
||||
// only start application without using the GUI
|
||||
// only start application without using the GUI
|
||||
qDebug ( CAboutDlg::GetVersionAndNameStr () );
|
||||
app.exec ();
|
||||
}
|
||||
}
|
||||
|
|
|
@ -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");
|
||||
}
|
||||
}
|
||||
|
||||
|
|
10
src/util.cpp
10
src/util.cpp
|
@ -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;
|
||||
}
|
||||
|
||||
|
||||
|
|
|
@ -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();
|
||||
};
|
||||
|
||||
|
||||
|
|
Loading…
Reference in a new issue