mirror of
https://invent.kde.org/network/falkon.git
synced 2024-11-11 01:22:10 +01:00
Merge branch 'Falkon/3.0'
This commit is contained in:
commit
c15b112a4c
|
@ -314,6 +314,7 @@ void QzToolsTest::copyRecursivelyTest()
|
|||
QFile file(testDir + "-copy/dir1/dir1_2/file1.txt");
|
||||
file.open(QFile::ReadOnly);
|
||||
QCOMPARE(file.readAll(), QByteArray("test"));
|
||||
file.close();
|
||||
|
||||
// Copy to target that already exists
|
||||
QCOMPARE(QzTools::copyRecursively(testDir, testDir + "-copy"), false);
|
||||
|
|
|
@ -338,14 +338,14 @@ bool TabTreeView::viewportEvent(QEvent *event)
|
|||
void TabTreeView::initView()
|
||||
{
|
||||
// Restore expanded state
|
||||
expandAll();
|
||||
QModelIndex index = model()->index(0, 0);
|
||||
while (index.isValid()) {
|
||||
WebTab *tab = index.data(TabModel::WebTabRole).value<WebTab*>();
|
||||
if (tab) {
|
||||
setExpanded(index, tab->sessionData().value(m_expandedSessionKey, true).toBool());
|
||||
}
|
||||
index = indexBelow(index);
|
||||
for (int i = 0; i < model()->rowCount(); ++i) {
|
||||
const QModelIndex index = model()->index(i, 0);
|
||||
reverseTraverse(index, [this](const QModelIndex &index) {
|
||||
WebTab *tab = index.data(TabModel::WebTabRole).value<WebTab*>();
|
||||
if (tab) {
|
||||
setExpanded(index, tab->sessionData().value(m_expandedSessionKey, true).toBool());
|
||||
}
|
||||
});
|
||||
}
|
||||
|
||||
m_initializing = false;
|
||||
|
|
|
@ -71,6 +71,9 @@ void VerticalTabsPlugin::init(InitState state, const QString &settingsPath)
|
|||
const auto windows = mApp->windows();
|
||||
for (BrowserWindow *window : windows) {
|
||||
mainWindowCreated(window);
|
||||
if (window->sideBarManager()->activeSideBar().isEmpty()) {
|
||||
window->sideBarManager()->showSideBar(QSL("VerticalTabs"));
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
@ -187,9 +190,7 @@ QString VerticalTabsPlugin::styleSheet() const
|
|||
|
||||
void VerticalTabsPlugin::mainWindowCreated(BrowserWindow *window)
|
||||
{
|
||||
if (window->sideBarManager()->activeSideBar().isEmpty()) {
|
||||
window->sideBarManager()->showSideBar(QSL("VerticalTabs"));
|
||||
}
|
||||
Q_UNUSED(window)
|
||||
setTabBarVisible(!m_replaceTabBar);
|
||||
}
|
||||
|
||||
|
|
Loading…
Reference in New Issue
Block a user