mirror of
https://github.com/Cockatrice/Cockatrice.git
synced 2026-06-12 00:54:53 -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
|
|
@ -55,16 +55,6 @@ ThemeManager *themeManager;
|
|||
const QString translationPrefix = "cockatrice";
|
||||
QString translationPath;
|
||||
|
||||
#if QT_VERSION < 0x050000
|
||||
static void myMessageOutput(QtMsgType /*type*/, const char *msg)
|
||||
{
|
||||
QFile file("qdebug.txt");
|
||||
file.open(QIODevice::WriteOnly | QIODevice::Truncate | QIODevice::Text);
|
||||
QTextStream out(&file);
|
||||
out << msg << endl;
|
||||
file.close();
|
||||
}
|
||||
#else
|
||||
static void myMessageOutput(QtMsgType /*type*/, const QMessageLogContext &, const QString &msg)
|
||||
{
|
||||
QFile file("qdebug.txt");
|
||||
|
|
@ -73,7 +63,6 @@ static void myMessageOutput(QtMsgType /*type*/, const QMessageLogContext &, cons
|
|||
out << msg << endl;
|
||||
file.close();
|
||||
}
|
||||
#endif
|
||||
|
||||
void installNewTranslator()
|
||||
{
|
||||
|
|
@ -103,22 +92,12 @@ int main(int argc, char *argv[])
|
|||
QApplication app(argc, argv);
|
||||
|
||||
if (app.arguments().contains("--debug-output"))
|
||||
{
|
||||
#if QT_VERSION < 0x050000
|
||||
qInstallMsgHandler(myMessageOutput);
|
||||
#else
|
||||
qInstallMessageHandler(myMessageOutput);
|
||||
#endif
|
||||
}
|
||||
|
||||
#ifdef Q_OS_WIN
|
||||
app.addLibraryPath(app.applicationDirPath() + "/plugins");
|
||||
#endif
|
||||
|
||||
#if QT_VERSION < 0x050000
|
||||
// gone in Qt5, all source files _MUST_ be utf8-encoded
|
||||
QTextCodec::setCodecForCStrings(QTextCodec::codecForName("UTF-8"));
|
||||
#endif
|
||||
|
||||
QCoreApplication::setOrganizationName("Cockatrice");
|
||||
QCoreApplication::setOrganizationDomain("cockatrice.de");
|
||||
QCoreApplication::setApplicationName("Cockatrice");
|
||||
|
|
@ -158,9 +137,8 @@ int main(int argc, char *argv[])
|
|||
|
||||
ui.show();
|
||||
qDebug("main(): ui.show() finished");
|
||||
#if QT_VERSION > 0x050000
|
||||
|
||||
app.setAttribute(Qt::AA_UseHighDpiPixmaps);
|
||||
#endif
|
||||
app.exec();
|
||||
|
||||
qDebug("Event loop finished, terminating...");
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue