Skip to content

Commit

Permalink
Remove unneeded early return for variable that we have as a parameter…
Browse files Browse the repository at this point in the history
… anyways
  • Loading branch information
alex1701c committed Oct 31, 2024
1 parent 2dc2ae7 commit e6f810f
Showing 1 changed file with 3 additions and 6 deletions.
9 changes: 3 additions & 6 deletions src/profile/ProfileManager.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -73,10 +73,8 @@ QList<Profile> ProfileManager::getFirefoxProfiles()
*/
QList<Profile> ProfileManager::getCustomProfiles(KSharedConfigPtr firefoxConfig)
{
Q_ASSERT(firefoxConfig);
QList<Profile> profiles;
if (firefoxDesktopFile.isEmpty()) {
return profiles;
}
const QStringList installedProfiles = firefoxConfig->groupList().filter(QRegularExpression("Desktop Action new-window-with-profile-.*"));
for (const auto &profileGroupName : installedProfiles) {
auto profileGroup = firefoxConfig->group(profileGroupName);
Expand Down Expand Up @@ -110,9 +108,8 @@ QList<Profile> ProfileManager::getCustomProfiles(KSharedConfigPtr firefoxConfig)
*/
void ProfileManager::syncDesktopFile(const QList<Profile> &profiles, KSharedConfigPtr firefoxConfig, const KConfigGroup &config)
{
if (firefoxDesktopFile.isEmpty()) {
return;
}
Q_ASSERT(firefoxConfig);
Q_ASSERT(config.isValid());
KConfigGroup generalConfig = firefoxConfig->group("Desktop Entry");
const QStringList installedProfiles = firefoxConfig->groupList().filter(QRegularExpression("Desktop Action new-window-with-profile-.*"));

Expand Down

0 comments on commit e6f810f

Please sign in to comment.