Commit 1860e669 authored by Laurent Montel's avatar Laurent Montel 😁

Minor optimization

parent 2bf2e651
...@@ -87,10 +87,7 @@ void FrameManager::slotRemoveFrame(int id) ...@@ -87,10 +87,7 @@ void FrameManager::slotRemoveFrame(int id)
{ {
Frame *frame = m_frames.value(id); Frame *frame = m_frames.value(id);
if (!frame) { if (!frame || !frame->isRemovable()) {
return;
}
if (!frame->isRemovable()) {
return; return;
} }
frame->disconnect(this); frame->disconnect(this);
...@@ -278,7 +275,8 @@ void FrameManager::saveProperties(KConfigGroup &config) ...@@ -278,7 +275,8 @@ void FrameManager::saveProperties(KConfigGroup &config)
QStringList strlst; QStringList strlst;
QString newPrefix; QString newPrefix;
QHash<int, Frame *>::const_iterator i; QHash<int, Frame *>::const_iterator i;
for (i = m_frames.constBegin(); i != m_frames.constEnd(); ++i) { QHash<int, Frame *>::const_iterator end(m_frames.constEnd());
for (i = m_frames.constBegin(); i != end; ++i) {
// No need to save the main frame // No need to save the main frame
if (i.value() && qobject_cast<WebEngineFrame *>(i.value())) { if (i.value() && qobject_cast<WebEngineFrame *>(i.value())) {
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment