mirror of
https://invent.kde.org/network/falkon.git
synced 2024-11-11 01:22:10 +01:00
StatusBarIcons: port foreach -> range-based for
Signed-off-by: Juraj Oravec <sgd.orava@gmail.com>
This commit is contained in:
parent
9de051fb20
commit
ff94cf69da
|
@ -155,7 +155,8 @@ void SBI_IconsManager::mainWindowCreated(BrowserWindow* window)
|
|||
|
||||
void SBI_IconsManager::mainWindowDeleted(BrowserWindow* window)
|
||||
{
|
||||
foreach (QWidget* w, m_windows[window]) {
|
||||
const auto windows = m_windows[window];
|
||||
for (QWidget* w : windows) {
|
||||
window->statusBar()->removeWidget(w);
|
||||
delete w;
|
||||
}
|
||||
|
|
|
@ -44,7 +44,8 @@ void SBI_NetworkManager::loadSettings()
|
|||
{
|
||||
QSettings settings(m_settingsFile, QSettings::IniFormat);
|
||||
|
||||
foreach (const QString &group, settings.childGroups()) {
|
||||
const auto groups = settings.childGroups();
|
||||
for (const QString &group : groups) {
|
||||
if (group.isEmpty()) {
|
||||
continue;
|
||||
}
|
||||
|
|
|
@ -38,7 +38,8 @@ void StatusBarIconsPlugin::init(InitState state, const QString &settingsPath)
|
|||
|
||||
// Make sure icons are added also to already created windows
|
||||
if (state == LateInitState) {
|
||||
foreach (BrowserWindow* window, mApp->windows()) {
|
||||
const auto windows = mApp->windows();
|
||||
for (BrowserWindow* window : windows) {
|
||||
m_manager->mainWindowCreated(window);
|
||||
}
|
||||
}
|
||||
|
@ -48,7 +49,8 @@ void StatusBarIconsPlugin::unload()
|
|||
{
|
||||
// Make sure icons are properly removed when unloading plugin (but not when closing app)
|
||||
if (!mApp->isClosing()) {
|
||||
foreach (BrowserWindow* window, mApp->windows()) {
|
||||
const auto windows = mApp->windows();
|
||||
for (BrowserWindow* window : windows) {
|
||||
m_manager->mainWindowDeleted(window);
|
||||
}
|
||||
|
||||
|
|
Loading…
Reference in New Issue
Block a user