mirror of
https://github.com/PrismLauncher/PrismLauncher.git
synced 2026-06-29 01:54:20 +03:00
chore: remove double spaces from logs
Signed-off-by: Octol1ttle <l1ttleofficial@outlook.com>
This commit is contained in:
parent
b69dbc2224
commit
584dc47da5
64 changed files with 224 additions and 222 deletions
|
|
@ -685,7 +685,7 @@ Application::Application(int& argc, char** argv) : QApplication(argc, argv)
|
||||||
QFontInfo consoleFontInfo(consoleFont);
|
QFontInfo consoleFontInfo(consoleFont);
|
||||||
QString resolvedDefaultMonospace = consoleFontInfo.family();
|
QString resolvedDefaultMonospace = consoleFontInfo.family();
|
||||||
QFont resolvedFont(resolvedDefaultMonospace);
|
QFont resolvedFont(resolvedDefaultMonospace);
|
||||||
qDebug() << "Detected default console font:" << resolvedDefaultMonospace
|
qDebug().nospace() << "Detected default console font: " << resolvedDefaultMonospace
|
||||||
<< ", substitutions: " << resolvedFont.substitutions().join(',');
|
<< ", substitutions: " << resolvedFont.substitutions().join(',');
|
||||||
|
|
||||||
m_settings->registerSetting("ConsoleFont", resolvedDefaultMonospace);
|
m_settings->registerSetting("ConsoleFont", resolvedDefaultMonospace);
|
||||||
|
|
|
||||||
|
|
@ -432,7 +432,7 @@ void create_link::make_link_list(const QString& offset)
|
||||||
link_file(src, "");
|
link_file(src, "");
|
||||||
} else {
|
} else {
|
||||||
if (m_debug)
|
if (m_debug)
|
||||||
qDebug() << "linking recursively:" << src << "to" << dst << ", max_depth:" << m_max_depth;
|
qDebug().nospace() << "linking recursively: " << src << " to " << dst << ", max_depth: " << m_max_depth;
|
||||||
QDir src_dir(src);
|
QDir src_dir(src);
|
||||||
QDirIterator source_it(src, QDir::Filter::Files | QDir::Filter::Hidden, QDirIterator::Subdirectories);
|
QDirIterator source_it(src, QDir::Filter::Files | QDir::Filter::Hidden, QDirIterator::Subdirectories);
|
||||||
|
|
||||||
|
|
|
||||||
|
|
@ -61,7 +61,7 @@ void ManifestDownloadTask::executeTask()
|
||||||
QJsonParseError parse_error{};
|
QJsonParseError parse_error{};
|
||||||
QJsonDocument doc = QJsonDocument::fromJson(*files, &parse_error);
|
QJsonDocument doc = QJsonDocument::fromJson(*files, &parse_error);
|
||||||
if (parse_error.error != QJsonParseError::NoError) {
|
if (parse_error.error != QJsonParseError::NoError) {
|
||||||
qWarning() << "Error while parsing JSON response at " << parse_error.offset << ". Reason: " << parse_error.errorString();
|
qWarning() << "Error while parsing JSON response at" << parse_error.offset << "reason:" << parse_error.errorString();
|
||||||
qWarning() << *files;
|
qWarning() << *files;
|
||||||
emitFailed(parse_error.errorString());
|
emitFailed(parse_error.errorString());
|
||||||
return;
|
return;
|
||||||
|
|
|
||||||
|
|
@ -479,6 +479,7 @@ void Component::clearUpdateAction()
|
||||||
|
|
||||||
QDebug operator<<(QDebug d, const Component& comp)
|
QDebug operator<<(QDebug d, const Component& comp)
|
||||||
{
|
{
|
||||||
d << "Component(" << comp.m_uid << " : " << comp.m_cachedVersion << ")";
|
QDebugStateSaver saver(d);
|
||||||
|
d.nospace() << "Component(" << comp.m_uid << " : " << comp.m_cachedVersion << ")";
|
||||||
return d;
|
return d;
|
||||||
}
|
}
|
||||||
|
|
|
||||||
|
|
@ -366,7 +366,7 @@ void PackProfile::updateSucceeded()
|
||||||
|
|
||||||
void PackProfile::updateFailed(const QString& error)
|
void PackProfile::updateFailed(const QString& error)
|
||||||
{
|
{
|
||||||
qCDebug(instanceProfileC) << d->m_instance->name() << "|" << "Component list update/resolve task failed " << "Reason:" << error;
|
qCDebug(instanceProfileC) << d->m_instance->name() << "|" << "Component list update/resolve task failed. Reason:" << error;
|
||||||
d->m_updateTask.reset();
|
d->m_updateTask.reset();
|
||||||
invalidateLaunchProfile();
|
invalidateLaunchProfile();
|
||||||
}
|
}
|
||||||
|
|
|
||||||
|
|
@ -405,7 +405,7 @@ void World::loadFromLevelDat(QByteArray data)
|
||||||
try {
|
try {
|
||||||
valPtr = &levelData->at("Data");
|
valPtr = &levelData->at("Data");
|
||||||
} catch (const std::out_of_range& e) {
|
} catch (const std::out_of_range& e) {
|
||||||
qWarning() << "Unable to read NBT tags from " << m_folderName << ":" << e.what();
|
qWarning().nospace() << "Unable to read NBT tags from " << m_folderName << ": " << e.what();
|
||||||
m_isValid = false;
|
m_isValid = false;
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
|
||||||
|
|
@ -670,7 +670,7 @@ void AccountList::tryNext()
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
qDebug() << "RefreshSchedule: Account with with internal ID " << accountId << " not found.";
|
qDebug() << "RefreshSchedule: Account with internal ID" << accountId << "not found.";
|
||||||
}
|
}
|
||||||
// if we get here, no account needed refreshing. Schedule refresh in an hour.
|
// if we get here, no account needed refreshing. Schedule refresh in an hour.
|
||||||
m_refreshTimer->start(1000 * 3600);
|
m_refreshTimer->start(1000 * 3600);
|
||||||
|
|
|
||||||
|
|
@ -120,12 +120,13 @@ void MSADeviceCodeStep::deviceAuthorizationFinished()
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
if (!m_request->wasSuccessful() || m_request->error() != QNetworkReply::NoError) {
|
if (!m_request->wasSuccessful() || m_request->error() != QNetworkReply::NoError) {
|
||||||
|
qWarning() << "Device authorization failed:" << *m_response;
|
||||||
emit finished(AccountTaskState::STATE_FAILED_HARD, tr("Failed to retrieve device authorization"));
|
emit finished(AccountTaskState::STATE_FAILED_HARD, tr("Failed to retrieve device authorization"));
|
||||||
qDebug() << *m_response;
|
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
if (rsp.device_code.isEmpty() || rsp.user_code.isEmpty() || rsp.verification_uri.isEmpty() || rsp.expires_in == 0) {
|
if (rsp.device_code.isEmpty() || rsp.user_code.isEmpty() || rsp.verification_uri.isEmpty() || rsp.expires_in == 0) {
|
||||||
|
qWarning() << "Device authorization failed: required fields missing";
|
||||||
emit finished(AccountTaskState::STATE_FAILED_HARD, tr("Device authorization failed: required fields missing"));
|
emit finished(AccountTaskState::STATE_FAILED_HARD, tr("Device authorization failed: required fields missing"));
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
|
||||||
|
|
@ -43,7 +43,7 @@ void AssetUpdateTask::executeTask()
|
||||||
connect(downloadJob.get(), &NetJob::progress, this, &AssetUpdateTask::progress);
|
connect(downloadJob.get(), &NetJob::progress, this, &AssetUpdateTask::progress);
|
||||||
connect(downloadJob.get(), &NetJob::stepProgress, this, &AssetUpdateTask::propagateStepProgress);
|
connect(downloadJob.get(), &NetJob::stepProgress, this, &AssetUpdateTask::propagateStepProgress);
|
||||||
|
|
||||||
qDebug() << m_inst->name() << ": Starting asset index download";
|
qDebug() << "Starting asset index download for" << m_inst->name();
|
||||||
downloadJob->start();
|
downloadJob->start();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
@ -55,7 +55,7 @@ bool AssetUpdateTask::canAbort() const
|
||||||
void AssetUpdateTask::assetIndexFinished()
|
void AssetUpdateTask::assetIndexFinished()
|
||||||
{
|
{
|
||||||
AssetsIndex index;
|
AssetsIndex index;
|
||||||
qDebug() << m_inst->name() << ": Finished asset index download";
|
qDebug() << "Finished asset index download for" << m_inst->name();
|
||||||
|
|
||||||
auto components = m_inst->getPackProfile();
|
auto components = m_inst->getPackProfile();
|
||||||
auto profile = components->getProfile();
|
auto profile = components->getProfile();
|
||||||
|
|
|
||||||
|
|
@ -354,7 +354,7 @@ Task::Ptr EnsureMetadataTask::flameVersionsTask()
|
||||||
QJsonParseError parse_error{};
|
QJsonParseError parse_error{};
|
||||||
QJsonDocument doc = QJsonDocument::fromJson(*response, &parse_error);
|
QJsonDocument doc = QJsonDocument::fromJson(*response, &parse_error);
|
||||||
if (parse_error.error != QJsonParseError::NoError) {
|
if (parse_error.error != QJsonParseError::NoError) {
|
||||||
qWarning() << "Error while parsing JSON response from Modrinth::CurrentVersions at " << parse_error.offset
|
qWarning() << "Error while parsing JSON response from Flame::CurrentVersions at" << parse_error.offset
|
||||||
<< "reason:" << parse_error.errorString();
|
<< "reason:" << parse_error.errorString();
|
||||||
qWarning() << *response;
|
qWarning() << *response;
|
||||||
|
|
||||||
|
|
@ -436,7 +436,7 @@ Task::Ptr EnsureMetadataTask::flameProjectsTask()
|
||||||
QJsonParseError parse_error{};
|
QJsonParseError parse_error{};
|
||||||
auto doc = QJsonDocument::fromJson(*response, &parse_error);
|
auto doc = QJsonDocument::fromJson(*response, &parse_error);
|
||||||
if (parse_error.error != QJsonParseError::NoError) {
|
if (parse_error.error != QJsonParseError::NoError) {
|
||||||
qWarning() << "Error while parsing JSON response from Modrinth projects task at " << parse_error.offset
|
qWarning() << "Error while parsing JSON response from Flame projects task at" << parse_error.offset
|
||||||
<< "reason:" << parse_error.errorString();
|
<< "reason:" << parse_error.errorString();
|
||||||
qWarning() << *response;
|
qWarning() << *response;
|
||||||
return;
|
return;
|
||||||
|
|
|
||||||
|
|
@ -47,7 +47,7 @@ Task::Ptr ResourceAPI::searchProjects(SearchArgs&& args, Callback<QList<ModPlatf
|
||||||
loadIndexedPack(*pack, packObj);
|
loadIndexedPack(*pack, packObj);
|
||||||
newList << pack;
|
newList << pack;
|
||||||
} catch (const JSONValidationError& e) {
|
} catch (const JSONValidationError& e) {
|
||||||
qWarning() << "Error while loading resource from " << debugName() << ": " << e.cause();
|
qWarning().nospace() << "Error while loading resource from " << debugName() << ": " << e.cause();
|
||||||
continue;
|
continue;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
@ -212,7 +212,7 @@ Task::Ptr ResourceAPI::getDependencyVersion(DependencySearchArgs&& args, Callbac
|
||||||
QJsonParseError parse_error{};
|
QJsonParseError parse_error{};
|
||||||
QJsonDocument doc = QJsonDocument::fromJson(*response, &parse_error);
|
QJsonDocument doc = QJsonDocument::fromJson(*response, &parse_error);
|
||||||
if (parse_error.error != QJsonParseError::NoError) {
|
if (parse_error.error != QJsonParseError::NoError) {
|
||||||
qWarning() << "Error while parsing JSON response for getting versions at " << parse_error.offset
|
qWarning() << "Error while parsing JSON response for getting dependency version at" << parse_error.offset
|
||||||
<< "reason:" << parse_error.errorString();
|
<< "reason:" << parse_error.errorString();
|
||||||
qWarning() << *response;
|
qWarning() << *response;
|
||||||
return;
|
return;
|
||||||
|
|
|
||||||
|
|
@ -142,7 +142,7 @@ void ModrinthCheckUpdate::checkVersionsResponse(QByteArray* response, std::optio
|
||||||
// If the returned project is empty, but we have Modrinth metadata,
|
// If the returned project is empty, but we have Modrinth metadata,
|
||||||
// it means this specific version is not available
|
// it means this specific version is not available
|
||||||
if (project_obj.isEmpty()) {
|
if (project_obj.isEmpty()) {
|
||||||
qDebug() << "Mod " << m_mappings.find(hash).value()->name() << " got an empty response." << "Hash: " << hash;
|
qDebug() << "Mod" << m_mappings.find(hash).value()->name() << "got an empty response. Hash:" << hash;
|
||||||
++iter;
|
++iter;
|
||||||
continue;
|
continue;
|
||||||
}
|
}
|
||||||
|
|
|
||||||
|
|
@ -182,7 +182,7 @@ void NetRequest::sslErrors(const QList<QSslError>& errors)
|
||||||
{
|
{
|
||||||
int i = 1;
|
int i = 1;
|
||||||
for (auto error : errors) {
|
for (auto error : errors) {
|
||||||
qCCritical(logCat) << getUid().toString() << "Request" << m_url.toString() << "SSL Error #" << i << " : " << error.errorString();
|
qCCritical(logCat).nospace() << getUid().toString() << " Request " << m_url.toString() << " SSL Error #" << i << ": " << error.errorString();
|
||||||
auto cert = error.certificate();
|
auto cert = error.certificate();
|
||||||
qCCritical(logCat) << getUid().toString() << "Certificate in question:\n" << cert.toText();
|
qCCritical(logCat) << getUid().toString() << "Certificate in question:\n" << cert.toText();
|
||||||
i++;
|
i++;
|
||||||
|
|
|
||||||
|
|
@ -118,7 +118,7 @@ void VersionList::sortVersions()
|
||||||
[versionStr](Java::MetadataPtr val) { return val->runtimeOS == versionStr; });
|
[versionStr](Java::MetadataPtr val) { return val->runtimeOS == versionStr; });
|
||||||
std::sort(m_vlist.begin(), m_vlist.end(), sortJavas);
|
std::sort(m_vlist.begin(), m_vlist.end(), sortJavas);
|
||||||
} else {
|
} else {
|
||||||
qWarning() << "No Java versions found for your operating system." << SysInfo::currentSystem() << " " << SysInfo::useQTForArch();
|
qWarning() << "No Java versions found for your operating system:" << SysInfo::currentSystem() << SysInfo::useQTForArch();
|
||||||
}
|
}
|
||||||
endResetModel();
|
endResetModel();
|
||||||
}
|
}
|
||||||
|
|
|
||||||
|
|
@ -59,7 +59,7 @@ void McClient::readRawResponse()
|
||||||
|
|
||||||
if (m_responseReadState == 1 && m_resp.size() >= m_wantedRespLength) {
|
if (m_responseReadState == 1 && m_resp.size() >= m_wantedRespLength) {
|
||||||
if (m_resp.size() > m_wantedRespLength) {
|
if (m_resp.size() > m_wantedRespLength) {
|
||||||
qDebug() << "Warning: Packet length doesn't match actual packet size (" << m_wantedRespLength << " expected vs "
|
qDebug().nospace() << "Warning: Packet length doesn't match actual packet size (" << m_wantedRespLength << " expected vs "
|
||||||
<< m_resp.size() << " received)";
|
<< m_resp.size() << " received)";
|
||||||
}
|
}
|
||||||
parseResponse();
|
parseResponse();
|
||||||
|
|
|
||||||
|
|
@ -100,7 +100,7 @@ class ThumbnailRunnable : public QRunnable {
|
||||||
QImage image(m_path);
|
QImage image(m_path);
|
||||||
if (image.isNull()) {
|
if (image.isNull()) {
|
||||||
m_resultEmitter.emitResultsFailed(m_path);
|
m_resultEmitter.emitResultsFailed(m_path);
|
||||||
qDebug() << "Error loading screenshot: " + m_path + ". Perhaps too large?";
|
qDebug() << "Error loading screenshot (perhaps too large?):" + m_path;
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
QImage small;
|
QImage small;
|
||||||
|
|
|
||||||
|
|
@ -23,7 +23,7 @@ void ServerPingTask::executeTask()
|
||||||
// Resolve the actual IP and port for the server
|
// Resolve the actual IP and port for the server
|
||||||
McResolver* resolver = new McResolver(nullptr, m_domain, m_port);
|
McResolver* resolver = new McResolver(nullptr, m_domain, m_port);
|
||||||
connect(resolver, &McResolver::succeeded, this, [this](QString ip, int port) {
|
connect(resolver, &McResolver::succeeded, this, [this](QString ip, int port) {
|
||||||
qDebug() << "Resolved Address for" << m_domain << ": " << ip << ":" << port;
|
qDebug().nospace().noquote() << "Resolved address for " << m_domain << ": " << ip << ":" << port;
|
||||||
|
|
||||||
// Now that we have the IP and port, query the server
|
// Now that we have the IP and port, query the server
|
||||||
McClient* client = new McClient(nullptr, m_domain, ip, port);
|
McClient* client = new McClient(nullptr, m_domain, ip, port);
|
||||||
|
|
|
||||||
|
|
@ -100,7 +100,7 @@ CustomTheme::CustomTheme(ITheme* baseTheme, QFileInfo& fileInfo, bool isManifest
|
||||||
// themeDebugLog << "Theme Path: " << path;
|
// themeDebugLog << "Theme Path: " << path;
|
||||||
|
|
||||||
if (!FS::ensureFilePathExists(path)) {
|
if (!FS::ensureFilePathExists(path)) {
|
||||||
themeWarningLog() << m_name << " Theme file path doesn't exist!";
|
themeWarningLog().nospace() << m_name << ": Theme file path doesn't exist!";
|
||||||
m_palette = baseTheme->colorScheme();
|
m_palette = baseTheme->colorScheme();
|
||||||
m_styleSheet = baseTheme->appStyleSheet();
|
m_styleSheet = baseTheme->appStyleSheet();
|
||||||
return;
|
return;
|
||||||
|
|
|
||||||
|
|
@ -49,7 +49,7 @@ class LibraryTest : public QObject {
|
||||||
{
|
{
|
||||||
QFile jsonFile(path);
|
QFile jsonFile(path);
|
||||||
if (!jsonFile.open(QIODevice::ReadOnly)) {
|
if (!jsonFile.open(QIODevice::ReadOnly)) {
|
||||||
qCritical() << "Failed to open file '" << jsonFile.fileName() << "' for reading!";
|
qCritical() << "Failed to open file" << jsonFile.fileName() << "for reading!";
|
||||||
return LibraryPtr();
|
return LibraryPtr();
|
||||||
}
|
}
|
||||||
auto data = jsonFile.readAll();
|
auto data = jsonFile.readAll();
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue