1
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:
David Rosca 2018-04-29 13:16:42 +02:00
commit c15b112a4c
No known key found for this signature in database
GPG Key ID: EBC3FC294452C6D8
3 changed files with 13 additions and 11 deletions

View File

@ -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);

View File

@ -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;

View File

@ -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);
}