chore: remove double spaces from logs

Signed-off-by: Octol1ttle <l1ttleofficial@outlook.com>
(cherry picked from commit 584dc47da5)
This commit is contained in:
Octol1ttle 2026-01-29 19:15:27 +05:00 committed by github-actions[bot]
parent 3e03d47fbf
commit 8cfeb30c56
64 changed files with 224 additions and 222 deletions

View file

@ -685,7 +685,7 @@ Application::Application(int& argc, char** argv) : QApplication(argc, argv)
QFontInfo consoleFontInfo(consoleFont);
QString resolvedDefaultMonospace = consoleFontInfo.family();
QFont resolvedFont(resolvedDefaultMonospace);
qDebug() << "Detected default console font:" << resolvedDefaultMonospace
qDebug().nospace() << "Detected default console font: " << resolvedDefaultMonospace
<< ", substitutions: " << resolvedFont.substitutions().join(',');
m_settings->registerSetting("ConsoleFont", resolvedDefaultMonospace);

View file

@ -432,7 +432,7 @@ void create_link::make_link_list(const QString& offset)
link_file(src, "");
} else {
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);
QDirIterator source_it(src, QDir::Filter::Files | QDir::Filter::Hidden, QDirIterator::Subdirectories);

View file

@ -61,7 +61,7 @@ void ManifestDownloadTask::executeTask()
QJsonParseError parse_error{};
QJsonDocument doc = QJsonDocument::fromJson(*files, &parse_error);
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;
emitFailed(parse_error.errorString());
return;

View file

@ -479,6 +479,7 @@ void Component::clearUpdateAction()
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;
}

View file

@ -366,7 +366,7 @@ void PackProfile::updateSucceeded()
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();
invalidateLaunchProfile();
}

View file

@ -405,7 +405,7 @@ void World::loadFromLevelDat(QByteArray data)
try {
valPtr = &levelData->at("Data");
} 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;
return;
}

View file

@ -632,7 +632,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.
m_refreshTimer->start(1000 * 3600);

View file

@ -120,12 +120,13 @@ void MSADeviceCodeStep::deviceAuthorizationFinished()
return;
}
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"));
qDebug() << *m_response;
return;
}
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"));
return;
}

View file

@ -43,7 +43,7 @@ void AssetUpdateTask::executeTask()
connect(downloadJob.get(), &NetJob::progress, this, &AssetUpdateTask::progress);
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();
}
@ -55,7 +55,7 @@ bool AssetUpdateTask::canAbort() const
void AssetUpdateTask::assetIndexFinished()
{
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 profile = components->getProfile();

View file

@ -354,7 +354,7 @@ Task::Ptr EnsureMetadataTask::flameVersionsTask()
QJsonParseError parse_error{};
QJsonDocument doc = QJsonDocument::fromJson(*response, &parse_error);
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();
qWarning() << *response;
@ -436,7 +436,7 @@ Task::Ptr EnsureMetadataTask::flameProjectsTask()
QJsonParseError parse_error{};
auto doc = QJsonDocument::fromJson(*response, &parse_error);
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();
qWarning() << *response;
return;

View file

@ -47,7 +47,7 @@ Task::Ptr ResourceAPI::searchProjects(SearchArgs&& args, Callback<QList<ModPlatf
loadIndexedPack(*pack, packObj);
newList << pack;
} catch (const JSONValidationError& e) {
qWarning() << "Error while loading resource from " << debugName() << ": " << e.cause();
qWarning().nospace() << "Error while loading resource from " << debugName() << ": " << e.cause();
continue;
}
}
@ -212,7 +212,7 @@ Task::Ptr ResourceAPI::getDependencyVersion(DependencySearchArgs&& args, Callbac
QJsonParseError parse_error{};
QJsonDocument doc = QJsonDocument::fromJson(*response, &parse_error);
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();
qWarning() << *response;
return;

View file

@ -142,7 +142,7 @@ void ModrinthCheckUpdate::checkVersionsResponse(std::shared_ptr<QByteArray> resp
// If the returned project is empty, but we have Modrinth metadata,
// it means this specific version is not available
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;
continue;
}

View file

@ -182,7 +182,7 @@ void NetRequest::sslErrors(const QList<QSslError>& errors)
{
int i = 1;
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();
qCCritical(logCat) << getUid().toString() << "Certificate in question:\n" << cert.toText();
i++;

View file

@ -118,7 +118,7 @@ void VersionList::sortVersions()
[versionStr](Java::MetadataPtr val) { return val->runtimeOS == versionStr; });
std::sort(m_vlist.begin(), m_vlist.end(), sortJavas);
} 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();
}

View file

@ -59,7 +59,7 @@ void McClient::readRawResponse()
if (m_responseReadState == 1 && 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)";
}
parseResponse();

View file

@ -100,7 +100,7 @@ class ThumbnailRunnable : public QRunnable {
QImage image(m_path);
if (image.isNull()) {
m_resultEmitter.emitResultsFailed(m_path);
qDebug() << "Error loading screenshot: " + m_path + ". Perhaps too large?";
qDebug() << "Error loading screenshot (perhaps too large?):" + m_path;
return;
}
QImage small;

View file

@ -23,7 +23,7 @@ void ServerPingTask::executeTask()
// Resolve the actual IP and port for the server
McResolver* resolver = new McResolver(nullptr, m_domain, m_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
McClient* client = new McClient(nullptr, m_domain, ip, port);

View file

@ -100,7 +100,7 @@ CustomTheme::CustomTheme(ITheme* baseTheme, QFileInfo& fileInfo, bool isManifest
// themeDebugLog << "Theme Path: " << 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_styleSheet = baseTheme->appStyleSheet();
return;

View file

@ -49,7 +49,7 @@ class LibraryTest : public QObject {
{
QFile jsonFile(path);
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();
}
auto data = jsonFile.readAll();