mirror of
https://github.com/Cockatrice/Cockatrice.git
synced 2026-04-27 07:48:01 -07:00
Drop Qt4, libgcrypt, qtmobility dependencies
This commit is contained in:
parent
e3fb308ea1
commit
bb5292aa8d
54 changed files with 96 additions and 818 deletions
|
|
@ -45,13 +45,8 @@ SmtpClient *smtpClient;
|
|||
|
||||
void testRNG();
|
||||
void testHash();
|
||||
#if QT_VERSION < 0x050000
|
||||
void myMessageOutput(QtMsgType type, const char *msg);
|
||||
void myMessageOutput2(QtMsgType type, const char *msg);
|
||||
#else
|
||||
void myMessageOutput(QtMsgType type, const QMessageLogContext &, const QString &msg);
|
||||
void myMessageOutput2(QtMsgType type, const QMessageLogContext &, const QString &msg);
|
||||
#endif
|
||||
|
||||
/* Implementations */
|
||||
|
||||
|
|
@ -100,18 +95,6 @@ void testHash()
|
|||
std::cerr << startTime.secsTo(endTime) << "secs" << std::endl;
|
||||
}
|
||||
|
||||
#if QT_VERSION < 0x050000
|
||||
void myMessageOutput(QtMsgType /*type*/, const char *msg)
|
||||
{
|
||||
logger->logMessage(msg);
|
||||
}
|
||||
|
||||
void myMessageOutput2(QtMsgType /*type*/, const char *msg)
|
||||
{
|
||||
logger->logMessage(msg);
|
||||
std::cerr << msg << std::endl;
|
||||
}
|
||||
#else
|
||||
void myMessageOutput(QtMsgType /*type*/, const QMessageLogContext &, const QString &msg)
|
||||
{
|
||||
logger->logMessage(msg);
|
||||
|
|
@ -122,7 +105,6 @@ void myMessageOutput2(QtMsgType /*type*/, const QMessageLogContext &, const QStr
|
|||
logger->logMessage(msg);
|
||||
std::cerr << msg.toStdString() << std::endl;
|
||||
}
|
||||
#endif
|
||||
|
||||
int main(int argc, char *argv[])
|
||||
{
|
||||
|
|
@ -141,11 +123,6 @@ int main(int argc, char *argv[])
|
|||
|
||||
qRegisterMetaType<QList<int> >("QList<int>");
|
||||
|
||||
#if QT_VERSION < 0x050000
|
||||
// gone in Qt5, all source files _MUST_ be utf8-encoded
|
||||
QTextCodec::setCodecForCStrings(QTextCodec::codecForName("UTF-8"));
|
||||
#endif
|
||||
|
||||
configPath = SettingsCache::guessConfigurationPath(configPath);
|
||||
qWarning() << "Using configuration file: " << configPath;
|
||||
settingsCache = new SettingsCache(configPath);
|
||||
|
|
@ -158,17 +135,10 @@ int main(int argc, char *argv[])
|
|||
loggerThread->start();
|
||||
QMetaObject::invokeMethod(logger, "startLog", Qt::BlockingQueuedConnection, Q_ARG(QString, settingsCache->value("server/logfile", QString("server.log")).toString()));
|
||||
|
||||
#if QT_VERSION < 0x050000
|
||||
if (logToConsole)
|
||||
qInstallMsgHandler(myMessageOutput);
|
||||
else
|
||||
qInstallMsgHandler(myMessageOutput2);
|
||||
#else
|
||||
if (logToConsole)
|
||||
qInstallMessageHandler(myMessageOutput);
|
||||
else
|
||||
qInstallMessageHandler(myMessageOutput2);
|
||||
#endif
|
||||
|
||||
signalhandler = new SignalHandler();
|
||||
|
||||
|
|
@ -193,11 +163,7 @@ int main(int argc, char *argv[])
|
|||
std::cerr << "-------------------------" << std::endl;
|
||||
std::cerr << "Server initialized." << std::endl;
|
||||
|
||||
#if QT_VERSION < 0x050000
|
||||
qInstallMsgHandler(myMessageOutput);
|
||||
#else
|
||||
qInstallMessageHandler(myMessageOutput);
|
||||
#endif
|
||||
|
||||
retval = app.exec();
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue