mirror of
https://github.com/huderlem/porymap.git
synced 2026-08-11 19:35:38 -05:00
Fix Qt5 build
Some checks are pending
Build Porymap / build-linux (, 5.14.2) (push) Waiting to run
Build Porymap / build-linux (, 6.8.*) (push) Waiting to run
Build Porymap / build-linux (minimal, 5.14.2) (push) Waiting to run
Build Porymap / build-macos (macos-15-intel) (push) Waiting to run
Build Porymap / build-macos (macos-latest) (push) Waiting to run
Build Porymap / build-static-windows (push) Waiting to run
Some checks are pending
Build Porymap / build-linux (, 5.14.2) (push) Waiting to run
Build Porymap / build-linux (, 6.8.*) (push) Waiting to run
Build Porymap / build-linux (minimal, 5.14.2) (push) Waiting to run
Build Porymap / build-macos (macos-15-intel) (push) Waiting to run
Build Porymap / build-macos (macos-latest) (push) Waiting to run
Build Porymap / build-static-windows (push) Waiting to run
This commit is contained in:
2
.github/workflows/main.yml
vendored
2
.github/workflows/main.yml
vendored
@@ -58,7 +58,7 @@ jobs:
|
||||
uses: jurplel/install-qt-action@v4
|
||||
with:
|
||||
# 6.10 is the first Qt version (by release date) to support macOS 26
|
||||
version: '6.10.*'
|
||||
version: '6.11.*'
|
||||
modules: 'qtcharts'
|
||||
cache: 'true'
|
||||
|
||||
|
||||
@@ -3,6 +3,7 @@
|
||||
#define LOG_H
|
||||
|
||||
#include <QString>
|
||||
#include <QHash>
|
||||
|
||||
enum class LogType {
|
||||
LOG_ERROR,
|
||||
@@ -10,6 +11,10 @@ enum class LogType {
|
||||
LOG_INFO,
|
||||
};
|
||||
|
||||
inline uint qHash(const LogType &key, uint seed = 0) {
|
||||
return qHash(static_cast<int>(key), seed);
|
||||
}
|
||||
|
||||
void logInit();
|
||||
void logInfo(const QString &message);
|
||||
void logWarn(const QString &message);
|
||||
|
||||
@@ -6,6 +6,7 @@
|
||||
|
||||
#include <QLabel>
|
||||
#include <QStatusBar>
|
||||
#include <QSet>
|
||||
#include <QTimer>
|
||||
|
||||
class LogStatusBar : public QStatusBar
|
||||
|
||||
@@ -1,9 +1,11 @@
|
||||
#include "paletteutil.h"
|
||||
#include "advancemapparser.h"
|
||||
#include "log.h"
|
||||
|
||||
#include <QFileInfo>
|
||||
#include <QRegularExpression>
|
||||
#include <QString>
|
||||
#include <QTextStream>
|
||||
|
||||
QList<QRgb> parsePal(QString filepath, bool *error);
|
||||
QList<QRgb> parseJASC(QString filepath, bool *error);
|
||||
|
||||
@@ -7,6 +7,7 @@
|
||||
#include <QJsonDocument>
|
||||
#include <QJsonObject>
|
||||
#include <QStack>
|
||||
#include <QSet>
|
||||
|
||||
#include "lib/fex/lexer.h"
|
||||
#include "lib/fex/parser.h"
|
||||
|
||||
@@ -1,6 +1,8 @@
|
||||
#include "logstatusbar.h"
|
||||
#include "logsignaler.h"
|
||||
|
||||
#include <QMap>
|
||||
|
||||
LogStatusBar::LogStatusBar(QWidget* parent) : QStatusBar(parent) {
|
||||
addWidget(&m_icon);
|
||||
addWidget(&m_message);
|
||||
|
||||
@@ -29,6 +29,7 @@ QString colorizeMessage(const QString &message, LogType type) {
|
||||
case LogType::LOG_WARN: return colorizeTypeName(message, "WARN", WARNING_COLOR);
|
||||
case LogType::LOG_ERROR: return colorizeTypeName(message, "ERROR", ERROR_COLOR);
|
||||
}
|
||||
return QString();
|
||||
}
|
||||
|
||||
QString colorizeMessage(const QString &message, QtMsgType type) {
|
||||
@@ -39,6 +40,7 @@ QString colorizeMessage(const QString &message, QtMsgType type) {
|
||||
case QtCriticalMsg: return colorizeTypeName(message, "QT ERROR", ERROR_COLOR);
|
||||
case QtFatalMsg: return colorizeTypeName(message, "QT FATAL", ERROR_COLOR);
|
||||
}
|
||||
return QString();
|
||||
}
|
||||
|
||||
std::ostream& consoleStream(LogType type) {
|
||||
@@ -49,6 +51,7 @@ std::ostream& consoleStream(LogType type) {
|
||||
case LogType::LOG_ERROR:
|
||||
return std::cerr;
|
||||
}
|
||||
return std::cout;
|
||||
}
|
||||
|
||||
std::ostream& consoleStream(QtMsgType type) {
|
||||
@@ -61,6 +64,7 @@ std::ostream& consoleStream(QtMsgType type) {
|
||||
case QtFatalMsg:
|
||||
return std::cerr;
|
||||
}
|
||||
return std::cout;
|
||||
}
|
||||
|
||||
QString prefix(LogType type) {
|
||||
@@ -69,6 +73,7 @@ QString prefix(LogType type) {
|
||||
case LogType::LOG_WARN: return QStringLiteral(" [WARN]");
|
||||
case LogType::LOG_ERROR: return QStringLiteral(" [ERROR]");
|
||||
}
|
||||
return QString();
|
||||
}
|
||||
|
||||
QString prefix(QtMsgType type) {
|
||||
@@ -79,6 +84,7 @@ QString prefix(QtMsgType type) {
|
||||
case QtCriticalMsg: return QStringLiteral("[QT ERROR]");
|
||||
case QtFatalMsg: return QStringLiteral("[QT FATAL]");
|
||||
}
|
||||
return QString();
|
||||
}
|
||||
|
||||
|
||||
|
||||
Reference in New Issue
Block a user