if (i >= count()) {
openNewActivatedTab();
}
- if (group.hasKey("Tab Data " % QString::number(i))) {
- // Tab state created with Dolphin > 4.14.x
- const QByteArray state = group.readEntry("Tab Data " % QString::number(i), QByteArray());
- tabPageAt(i)->restoreState(state);
- } else {
- // Tab state created with Dolphin <= 4.14.x
- const QByteArray state = group.readEntry("Tab " % QString::number(i), QByteArray());
- tabPageAt(i)->restoreStateV1(state);
- }
+ const QByteArray state = group.readEntry("Tab Data " % QString::number(i), QByteArray());
+ tabPageAt(i)->restoreState(state);
}
const int index = group.readEntry("Active Tab Index", 0);
// Required for updateViewState() call in openFiles() to work as expected
// If there is a selection, updateViewState() calls are effectively a no-op
tabPage->activeViewContainer()->view()->clearSelection();
- } else if (splitView) {
+ } else if (splitView && (it != dirs.constEnd())) {
const QUrl& secondaryUrl = *(it++);
if (somethingWasAlreadyOpen) {
openNewTab(primaryUrl, secondaryUrl);