diff --git a/src/calamares/CalamaresWindow.cpp b/src/calamares/CalamaresWindow.cpp index e11990600..f0ae03525 100644 --- a/src/calamares/CalamaresWindow.cpp +++ b/src/calamares/CalamaresWindow.cpp @@ -79,7 +79,7 @@ CalamaresWindow::CalamaresWindow( QWidget* parent ) int w = qBound( minimumSize.width(), windowDimensionToPixels( brandingSizes.first ), availableSize.width() ); int h = qBound( minimumSize.height(), windowDimensionToPixels( brandingSizes.second ), availableSize.height() ); - cDebug() << " Proposed window size:" << w << h; + cDebug() << Logger::SubEntry << "Proposed window size:" << w << h; resize( w, h ); QBoxLayout* mainLayout = new QHBoxLayout; diff --git a/src/calamares/testmain.cpp b/src/calamares/testmain.cpp index 69c2f0884..198342ae1 100644 --- a/src/calamares/testmain.cpp +++ b/src/calamares/testmain.cpp @@ -223,7 +223,7 @@ main( int argc, char* argv[] ) Calamares::JobResult r = p->exec(); if ( !r ) { - cDebug() << count << ".. failed" + cDebug() << "Job #" << count << "failed" << TR( "summary", r.message() ) << TR( "details", r.details() ); } diff --git a/src/libcalamares/PythonJobApi.cpp b/src/libcalamares/PythonJobApi.cpp index 77a83fa3b..c94aa34e1 100644 --- a/src/libcalamares/PythonJobApi.cpp +++ b/src/libcalamares/PythonJobApi.cpp @@ -285,11 +285,11 @@ gettext_path() QDir ldir( localedir ); if ( ldir.cd( lang ) ) { - cDebug() << " .. Found" << lang << "in" << ldir.canonicalPath(); + cDebug() << Logger::SubEntry << "Found" << lang << "in" << ldir.canonicalPath(); return bp::object( localedir.toStdString() ); } } - cDebug() << " .. No translation found for languages" << candidateLanguages; + cDebug() << Logger::SubEntry << "No translation found for languages" << candidateLanguages; return bp::object(); // None } diff --git a/src/libcalamares/utils/CalamaresUtils.cpp b/src/libcalamares/utils/CalamaresUtils.cpp index 8441218d2..0ff6810c1 100644 --- a/src/libcalamares/utils/CalamaresUtils.cpp +++ b/src/libcalamares/utils/CalamaresUtils.cpp @@ -228,11 +228,11 @@ installTranslator( const QLocale& locale, "_", brandingTranslationsDir.absolutePath() ) ) { - cDebug() << " .. Branding using locale:" << localeName; + cDebug() << Logger::SubEntry << "Branding using locale:" << localeName; } else { - cDebug() << " .. Branding using default, system locale not found:" << localeName; + cDebug() << Logger::SubEntry << "Branding using default, system locale not found:" << localeName; translator->load( brandingTranslationsPrefix + "en" ); } @@ -251,11 +251,11 @@ installTranslator( const QLocale& locale, translator = new QTranslator( parent ); if ( translator->load( QString( ":/lang/calamares_" ) + localeName ) ) { - cDebug() << " .. Calamares using locale:" << localeName; + cDebug() << Logger::SubEntry << "Calamares using locale:" << localeName; } else { - cDebug() << " .. Calamares using default, system locale not found:" << localeName; + cDebug() << Logger::SubEntry << "Calamares using default, system locale not found:" << localeName; translator->load( QString( ":/lang/calamares_en" ) ); } diff --git a/src/libcalamares/utils/CalamaresUtilsSystem.cpp b/src/libcalamares/utils/CalamaresUtilsSystem.cpp index cb4bbd66a..e8819aa31 100644 --- a/src/libcalamares/utils/CalamaresUtilsSystem.cpp +++ b/src/libcalamares/utils/CalamaresUtilsSystem.cpp @@ -65,7 +65,7 @@ System::instance() if ( !s_instance ) { cError() << "No Calamares system-object has been created."; - cError() << " .. using a bogus instance instead."; + cError() << Logger::SubEntry << "using a bogus instance instead."; return new System( true, nullptr ); } return s_instance; diff --git a/src/libcalamaresui/modulesystem/RequirementsChecker.cpp b/src/libcalamaresui/modulesystem/RequirementsChecker.cpp index 1e98a3968..7eccdbbc0 100644 --- a/src/libcalamaresui/modulesystem/RequirementsChecker.cpp +++ b/src/libcalamaresui/modulesystem/RequirementsChecker.cpp @@ -112,7 +112,7 @@ RequirementsChecker::finished() { if ( r.mandatory && !r.satisfied ) { - cDebug() << " .. requirement" << count << r.name << "is not satisfied."; + cDebug() << Logger::SubEntry << "requirement" << count << r.name << "is not satisfied."; acceptable = false; } ++count; diff --git a/src/modules/fsresizer/ResizeFSJob.cpp b/src/modules/fsresizer/ResizeFSJob.cpp index 61fbc6898..a44815345 100644 --- a/src/modules/fsresizer/ResizeFSJob.cpp +++ b/src/modules/fsresizer/ResizeFSJob.cpp @@ -134,11 +134,11 @@ ResizeFSJob::findPartition( CoreBackend* backend ) cDebug() << "ResizeFSJob found" << ( *dev_it )->deviceNode(); for ( auto part_it = PartitionIterator::begin( *dev_it ); part_it != PartitionIterator::end( *dev_it ); ++part_it ) { - cDebug() << ".." << ( *part_it )->mountPoint() << "on" << ( *part_it )->deviceNode(); + cDebug() << Logger::SubEntry << ( *part_it )->mountPoint() << "on" << ( *part_it )->deviceNode(); if ( ( !m_fsname.isEmpty() && ( *part_it )->mountPoint() == m_fsname ) || ( !m_devicename.isEmpty() && ( *part_it )->deviceNode() == m_devicename ) ) { - cDebug() << ".. matched configuration dev=" << m_devicename << "fs=" << m_fsname; + cDebug() << Logger::SubEntry << "matched configuration dev=" << m_devicename << "fs=" << m_fsname; return PartitionMatch( *dev_it, *part_it ); } } @@ -182,13 +182,13 @@ ResizeFSJob::findGrownEnd( ResizeFSJob::PartitionMatch m ) } if ( ( *part_it )->roles().has( PartitionRole::Unallocated ) ) { - cDebug() << ".. ignoring unallocated" << next_start << '-' << next_end; + cDebug() << Logger::SubEntry << "ignoring unallocated" << next_start << '-' << next_end; continue; } - cDebug() << ".. comparing" << next_start << '-' << next_end; + cDebug() << Logger::SubEntry << "comparing" << next_start << '-' << next_end; if ( ( next_start > last_currently ) && ( next_start < last_available ) ) { - cDebug() << " .. shrunk last available to" << next_start; + cDebug() << Logger::SubEntry << "shrunk last available to" << next_start; last_available = next_start - 1; // Before that one starts } } @@ -205,7 +205,7 @@ ResizeFSJob::findGrownEnd( ResizeFSJob::PartitionMatch m ) qint64 required = m_atleast.apply( m.first ); if ( expand < required ) { - cDebug() << ".. need to expand by" << required << "but only" << expand << "is available."; + cDebug() << Logger::SubEntry << "need to expand by" << required << "but only" << expand << "is available."; return 0; } } @@ -213,7 +213,7 @@ ResizeFSJob::findGrownEnd( ResizeFSJob::PartitionMatch m ) qint64 wanted = m_size.apply( expand, m.first->logicalSize() ); if ( wanted < expand ) { - cDebug() << ".. only growing by" << wanted << "instead of full" << expand; + cDebug() << Logger::SubEntry << "only growing by" << wanted << "instead of full" << expand; last_available -= ( expand - wanted ); } diff --git a/src/modules/keyboard/KeyboardPage.cpp b/src/modules/keyboard/KeyboardPage.cpp index 9056ba273..5a82e2545 100644 --- a/src/modules/keyboard/KeyboardPage.cpp +++ b/src/modules/keyboard/KeyboardPage.cpp @@ -254,14 +254,14 @@ KeyboardPage::guessLayout( const QStringList& langParts ) bool foundCountryPart = false; for ( auto countryPart = langParts.rbegin(); !foundCountryPart && countryPart != langParts.rend(); ++countryPart ) { - cDebug() << " .. looking for locale part" << *countryPart; + cDebug() << Logger::SubEntry << "looking for locale part" << *countryPart; for ( int i = 0; i < klm->rowCount(); ++i ) { QModelIndex idx = klm->index( i ); QString name = idx.isValid() ? idx.data( KeyboardLayoutModel::KeyboardLayoutKeyRole ).toString() : QString(); if ( idx.isValid() && ( name.compare( *countryPart, Qt::CaseInsensitive ) == 0 ) ) { - cDebug() << " .. matched" << name; + cDebug() << Logger::SubEntry << "matched" << name; ui->listLayout->setCurrentIndex( idx ); foundCountryPart = true; break; @@ -279,7 +279,7 @@ KeyboardPage::guessLayout( const QStringList& langParts ) if ( variantdata && (variantdata->data.compare( *countryPart, Qt::CaseInsensitive ) == 0) ) { ui->listVariant->setCurrentItem( variantdata ); - cDebug() << " .. matched variant" << variantdata->data << ' ' << variantdata->text(); + cDebug() << Logger::SubEntry << "matched variant" << variantdata->data << ' ' << variantdata->text(); } } } @@ -361,7 +361,7 @@ KeyboardPage::onActivate() if ( specialCaseMap.contains( lang_s ) ) { QString newLang = QString::fromStdString( specialCaseMap.value( lang_s ) ); - cDebug() << " .. special case language" << lang << "becomes" << newLang; + cDebug() << Logger::SubEntry << "special case language" << lang << "becomes" << newLang; lang = newLang; } } @@ -372,7 +372,7 @@ KeyboardPage::onActivate() // Note that this his string is not fit for display purposes! // It doesn't come from QLocale::nativeCountryName. QString country = QLocale::countryToString( QLocale( lang ).country() ); - cDebug() << " .. extracted country" << country << "::" << langParts; + cDebug() << Logger::SubEntry << "extracted country" << country << "::" << langParts; guessLayout( langParts ); } diff --git a/src/modules/keyboard/SetKeyboardLayoutJob.cpp b/src/modules/keyboard/SetKeyboardLayoutJob.cpp index 75c52bb51..2a62c576c 100644 --- a/src/modules/keyboard/SetKeyboardLayoutJob.cpp +++ b/src/modules/keyboard/SetKeyboardLayoutJob.cpp @@ -66,7 +66,7 @@ QString SetKeyboardLayoutJob::findConvertedKeymap( const QString& convertedKeymapPath ) const { cDebug() << "Looking for converted keymap in" << convertedKeymapPath; - + // No search path supplied, assume the distribution does not provide // converted keymaps if ( convertedKeymapPath.isEmpty() ) @@ -78,7 +78,7 @@ SetKeyboardLayoutJob::findConvertedKeymap( const QString& convertedKeymapPath ) if ( convertedKeymapDir.exists( name + ".map" ) || convertedKeymapDir.exists( name + ".map.gz" ) ) { - cDebug() << ".. Found converted keymap" << name; + cDebug() << Logger::SubEntry << "Found converted keymap" << name; return name; } @@ -90,7 +90,7 @@ QString SetKeyboardLayoutJob::findLegacyKeymap() const { cDebug() << "Looking for legacy keymap in QRC"; - + int bestMatching = 0; QString name; @@ -140,7 +140,7 @@ SetKeyboardLayoutJob::findLegacyKeymap() const // The best matching entry so far, then let's save that if ( matching >= qMax( bestMatching, 1 ) ) { - cDebug() << ".. Found legacy keymap" << mapping[0] + cDebug() << Logger::SubEntry << "Found legacy keymap" << mapping[0] << "with score" << matching; if ( matching > bestMatching ) diff --git a/src/modules/locale/timezonewidget/timezonewidget.cpp b/src/modules/locale/timezonewidget/timezonewidget.cpp index 7b5a2f0d3..a228f000c 100644 --- a/src/modules/locale/timezonewidget/timezonewidget.cpp +++ b/src/modules/locale/timezonewidget/timezonewidget.cpp @@ -95,8 +95,8 @@ void TimeZoneWidget::setCurrentLocation( LocaleGlobal::Location location ) #ifdef DEBUG_TIMEZONES cDebug() << "Setting location" << location.region << location.zone << location.country; - cDebug() << " .. long" << location.longitude << "lat" << location.latitude; - cDebug() << " .. x" << pos.x() << "y" << pos.y(); + cDebug() << Logger::SubEntry << "longitude" << location.longitude << "latitude" << location.latitude; + cDebug() << Logger::SubEntry << "pixel x" << pos.x() << "pixel y" << pos.y(); bool found = false; #endif @@ -116,10 +116,10 @@ void TimeZoneWidget::setCurrentLocation( LocaleGlobal::Location location ) { currentZoneImage = zone; found = true; - cDebug() << " .. First zone found" << i << zone.text( ZONE_NAME ); + cDebug() << Logger::SubEntry << "First zone found" << i << zone.text( ZONE_NAME ); } else - cDebug() << " .. Also in zone" << i << zone.text( ZONE_NAME ); + cDebug() << Logger::SubEntry << "Also in zone" << i << zone.text( ZONE_NAME ); #else currentZoneImage = zone; break; diff --git a/src/modules/netinstall/NetInstallPage.cpp b/src/modules/netinstall/NetInstallPage.cpp index 39282ef00..5b7f55be3 100644 --- a/src/modules/netinstall/NetInstallPage.cpp +++ b/src/modules/netinstall/NetInstallPage.cpp @@ -81,8 +81,8 @@ NetInstallPage::dataIsHere( QNetworkReply* reply ) if ( reply->error() != QNetworkReply::NoError ) { cWarning() << "unable to fetch netinstall package lists."; - cDebug() << " ..Netinstall reply error: " << reply->error(); - cDebug() << " ..Request for url: " << reply->url().toString() << " failed with: " << reply->errorString(); + cDebug() << Logger::SubEntry << "Netinstall reply error: " << reply->error(); + cDebug() << Logger::SubEntry << "Request for url: " << reply->url().toString() << " failed with: " << reply->errorString(); ui->netinst_status->setText( tr( "Network Installation. (Disabled: Unable to fetch package lists, check your network connection)" ) ); emit checkReady( !m_required ); return; @@ -91,8 +91,8 @@ NetInstallPage::dataIsHere( QNetworkReply* reply ) if ( !readGroups( reply->readAll() ) ) { cWarning() << "netinstall groups data was received, but invalid."; - cDebug() << " ..Url: " << reply->url().toString(); - cDebug() << " ..Headers: " << reply->rawHeaderList(); + cDebug() << Logger::SubEntry << "Url: " << reply->url().toString(); + cDebug() << Logger::SubEntry << "Headers: " << reply->rawHeaderList(); ui->netinst_status->setText( tr( "Network Installation. (Disabled: Received invalid groups data)" ) ); reply->deleteLater(); emit checkReady( !m_required ); diff --git a/src/modules/netinstall/NetInstallViewStep.cpp b/src/modules/netinstall/NetInstallViewStep.cpp index 3c4fa5e58..9964dcec3 100644 --- a/src/modules/netinstall/NetInstallViewStep.cpp +++ b/src/modules/netinstall/NetInstallViewStep.cpp @@ -148,14 +148,14 @@ NetInstallViewStep::onLeave() QMap op; op.insert( "install", QVariant( installPackages ) ); packageOperations.append( op ); - cDebug() << " .." << installPackages.length() << "critical packages."; + cDebug() << Logger::SubEntry << installPackages.length() << "critical packages."; } if ( !tryInstallPackages.empty() ) { QMap op; op.insert( "try_install", QVariant( tryInstallPackages ) ); packageOperations.append( op ); - cDebug() << " .." << tryInstallPackages.length() << "non-critical packages."; + cDebug() << Logger::SubEntry << tryInstallPackages.length() << "non-critical packages."; } if ( !packageOperations.isEmpty() ) diff --git a/src/modules/partition/core/PartUtils.cpp b/src/modules/partition/core/PartUtils.cpp index 4feea0e38..f4d04ce62 100644 --- a/src/modules/partition/core/PartUtils.cpp +++ b/src/modules/partition/core/PartUtils.cpp @@ -236,7 +236,7 @@ lookForFstabEntries( const QString& partitionPath ) { QFile fstabFile( mountsDir.path() + "/etc/fstab" ); - cDebug() << " .. reading" << fstabFile.fileName(); + cDebug() << Logger::SubEntry << "reading" << fstabFile.fileName(); if ( fstabFile.open( QIODevice::ReadOnly | QIODevice::Text ) ) { @@ -246,9 +246,9 @@ lookForFstabEntries( const QString& partitionPath ) for ( const QString& rawLine : fstabLines ) fstabEntries.append( FstabEntry::fromEtcFstab( rawLine ) ); fstabFile.close(); - cDebug() << " .. got" << fstabEntries.count() << "lines."; + cDebug() << Logger::SubEntry << "got" << fstabEntries.count() << "lines."; std::remove_if( fstabEntries.begin(), fstabEntries.end(), [](const FstabEntry& x) { return !x.isValid(); } ); - cDebug() << " .. got" << fstabEntries.count() << "fstab entries."; + cDebug() << Logger::SubEntry << "got" << fstabEntries.count() << "fstab entries."; } else cWarning() << "Could not read fstab from mounted fs"; @@ -408,7 +408,7 @@ bool isEfiBootable( const Partition* candidate ) { cDebug() << "Check EFI bootable" << convenienceName( candidate ) << candidate->devicePath(); - cDebug() << " .. flags" << candidate->activeFlags(); + cDebug() << Logger::SubEntry << "flags" << candidate->activeFlags(); auto flags = PartitionInfo::flags( candidate ); @@ -421,7 +421,7 @@ isEfiBootable( const Partition* candidate ) while ( root && !root->isRoot() ) { root = root->parent(); - cDebug() << " .. moved towards root" << (void *)root; + cDebug() << Logger::SubEntry << "moved towards root" << (void *)root; } // Strange case: no root found, no partition table node? @@ -429,7 +429,7 @@ isEfiBootable( const Partition* candidate ) return false; const PartitionTable* table = dynamic_cast( root ); - cDebug() << " .. partition table" << (void *)table << "type" << ( table ? table->type() : PartitionTable::TableType::unknownTableType ); + cDebug() << Logger::SubEntry << "partition table" << (void *)table << "type" << ( table ? table->type() : PartitionTable::TableType::unknownTableType ); return table && ( table->type() == PartitionTable::TableType::gpt ) && flags.testFlag( KPM_PARTITION_FLAG(Boot) ); } diff --git a/src/modules/partition/core/PartitionCoreModule.cpp b/src/modules/partition/core/PartitionCoreModule.cpp index f50510da7..27ac14d29 100644 --- a/src/modules/partition/core/PartitionCoreModule.cpp +++ b/src/modules/partition/core/PartitionCoreModule.cpp @@ -173,7 +173,7 @@ PartitionCoreModule::doInit() m_deviceInfos << deviceInfo; cDebug() << device->deviceNode() << device->capacity() << device->name() << device->prettyName(); } - cDebug() << ".." << devices.count() << "devices detected."; + cDebug() << Logger::SubEntry << devices.count() << "devices detected."; m_deviceModel->init( devices ); // The following PartUtils::runOsprober call in turn calls PartUtils::canBeResized, @@ -504,11 +504,11 @@ PartitionCoreModule::jobs() const #ifdef DEBUG_PARTITION_UNSAFE #ifdef DEBUG_PARTITION_LAME cDebug() << "Unsafe partitioning is enabled."; - cDebug() << ".. it has been lamed, and will fail."; + cDebug() << Logger::SubEntry << "it has been lamed, and will fail."; lst << Calamares::job_ptr( new Calamares::FailJob( QStringLiteral( "Partition" ) ) ); #else cWarning() << "Unsafe partitioning is enabled."; - cWarning() << ".. the unsafe actions will be executed."; + cWarning() << Logger::SubEntry << "the unsafe actions will be executed."; #endif #endif diff --git a/src/modules/partition/jobs/FillGlobalStorageJob.cpp b/src/modules/partition/jobs/FillGlobalStorageJob.cpp index 72146e2a0..7a82e9f1a 100644 --- a/src/modules/partition/jobs/FillGlobalStorageJob.cpp +++ b/src/modules/partition/jobs/FillGlobalStorageJob.cpp @@ -96,7 +96,7 @@ mapForPartition( Partition* partition, const QString& uuid ) // so indent a bit Logger::CDebug deb; using TR = Logger::DebugRow; - deb << " .. mapping for" << partition->partitionPath() << partition->deviceNode() + deb << Logger::SubEntry << "mapping for" << partition->partitionPath() << partition->deviceNode() << TR( "mtpoint:", PartitionInfo::mountPoint( partition ) ) << TR( "fs:", map[ "fs" ].toString() ) << TR( "fsname", map[ "fsName" ].toString() ) @@ -221,7 +221,7 @@ FillGlobalStorageJob::createPartitionList() const cDebug() << "Writing to GlobalStorage[\"partitions\"]"; for ( auto device : m_devices ) { - cDebug() << ".. partitions on" << device->deviceNode(); + cDebug() << Logger::SubEntry << "partitions on" << device->deviceNode(); for ( auto it = PartitionIterator::begin( device ); it != PartitionIterator::end( device ); ++it ) { diff --git a/src/modules/tracking/TrackingViewStep.cpp b/src/modules/tracking/TrackingViewStep.cpp index 304e2a971..412156833 100644 --- a/src/modules/tracking/TrackingViewStep.cpp +++ b/src/modules/tracking/TrackingViewStep.cpp @@ -126,7 +126,7 @@ TrackingViewStep::jobs() const .replace( "$MEMORY", memory ) .replace( "$DISK", disk ); - cDebug() << " .. install-tracking URL" << installUrl; + cDebug() << Logger::SubEntry << "install-tracking URL" << installUrl; l.append( Calamares::job_ptr( new TrackingInstallJob( installUrl ) ) ); } diff --git a/src/modules/users/CheckPWQuality.cpp b/src/modules/users/CheckPWQuality.cpp index e44729168..7fa13f124 100644 --- a/src/modules/users/CheckPWQuality.cpp +++ b/src/modules/users/CheckPWQuality.cpp @@ -55,7 +55,7 @@ DEFINE_CHECK_FUNC( minLength ) minLength = value.toInt(); if ( minLength > 0 ) { - cDebug() << " .. minLength set to" << minLength; + cDebug() << Logger::SubEntry << "minLength set to" << minLength; checks.push_back( PasswordCheck( []() @@ -77,7 +77,7 @@ DEFINE_CHECK_FUNC( maxLength ) maxLength = value.toInt(); if ( maxLength > 0 ) { - cDebug() << " .. maxLength set to" << maxLength; + cDebug() << Logger::SubEntry << "maxLength set to" << maxLength; checks.push_back( PasswordCheck( []() @@ -94,7 +94,7 @@ DEFINE_CHECK_FUNC( maxLength ) #ifdef HAVE_LIBPWQUALITY /* NOTE: - * + * * The munge*() functions are here because libpwquality uses void* to * represent user-data in callbacks and as a general "pass some parameter" * type. These need to be munged to the right C++ type. @@ -313,7 +313,7 @@ DEFINE_CHECK_FUNC( libpwquality ) cWarning() << "unrecognized libpwquality setting" << option; else { - cDebug() << " .. libpwquality setting" << option; + cDebug() << Logger::SubEntry << "libpwquality setting" << option; ++requirement_count; } } diff --git a/src/modules/welcome/WelcomePage.cpp b/src/modules/welcome/WelcomePage.cpp index 7d86567d7..92dab668b 100644 --- a/src/modules/welcome/WelcomePage.cpp +++ b/src/modules/welcome/WelcomePage.cpp @@ -140,7 +140,7 @@ bool matchLocale( QComboBox& list, QLocale& matchFound, std::function