Skip to content

Commit

Permalink
Merge pull request #483 from KDAB/pre-commit-ci-update-config
Browse files Browse the repository at this point in the history
[pre-commit.ci] pre-commit autoupdate
  • Loading branch information
Allen Winter authored Apr 2, 2024
2 parents 7b84974 + f4ada6d commit cd6a334
Show file tree
Hide file tree
Showing 23 changed files with 319 additions and 322 deletions.
8 changes: 4 additions & 4 deletions .pre-commit-config.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,7 @@ repos:
- id: destroyed-symlinks
- id: check-executables-have-shebangs
- repo: https://github.com/pre-commit/mirrors-clang-format
rev: v17.0.6
rev: v18.1.2
hooks:
- id: clang-format
exclude: (.json)
Expand All @@ -32,7 +32,7 @@ repos:
exclude: ^(.cmake-format.py|conan/conanfile.py)
additional_dependencies: ["PySide2", "PySide6"]
- repo: https://github.com/hhatto/autopep8
rev: v2.0.4
rev: v2.1.0
hooks:
- id: autopep8
- repo: https://github.com/codespell-project/codespell
Expand All @@ -51,10 +51,10 @@ repos:
hooks:
- id: reuse
- repo: https://github.com/scop/pre-commit-shfmt
rev: v3.7.0-4
rev: v3.8.0-1
hooks:
- id: shfmt
- repo: https://github.com/shellcheck-py/shellcheck-py
rev: v0.9.0.6
rev: v0.10.0.1
hooks:
- id: shellcheck
2 changes: 1 addition & 1 deletion src/core/Position.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -198,7 +198,7 @@ LayoutSaver::Position Position::serialize() const
p.indexOfFloatingWindow = fw->beingDeleted()
? -1
: DockRegistry::self()->floatingWindows().indexOf(
fw);
fw);
} else {
p.mainWindowUniqueName = mainWindow->uniqueName();
assert(!p.mainWindowUniqueName.isEmpty());
Expand Down
2 changes: 1 addition & 1 deletion src/core/Separator.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -100,7 +100,7 @@ Separator::Separator(LayoutingHost *host, Qt::Orientation orientation, Core::Ite
view()->show();
view()->init();
d->lazyResizeRubberBand = d->usesLazyResize ? Config::self().viewFactory()->createRubberBand(
rubberBandIsTopLevel() ? nullptr : view())
rubberBandIsTopLevel() ? nullptr : view())
: nullptr;
setVisible(true);
}
Expand Down
8 changes: 4 additions & 4 deletions src/core/TitleBar.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -41,8 +41,8 @@ using namespace KDDockWidgets::Core;

TitleBar::TitleBar(Group *parent)
: Controller(
ViewType::TitleBar,
Config::self().viewFactory()->createTitleBar(this, parent ? parent->view() : nullptr))
ViewType::TitleBar,
Config::self().viewFactory()->createTitleBar(this, parent ? parent->view() : nullptr))
, Draggable(view())
, d(new Private())
, m_group(parent)
Expand All @@ -67,8 +67,8 @@ TitleBar::TitleBar(Group *parent)

TitleBar::TitleBar(FloatingWindow *parent)
: Controller(
ViewType::TitleBar,
Config::self().viewFactory()->createTitleBar(this, parent ? parent->view() : nullptr))
ViewType::TitleBar,
Config::self().viewFactory()->createTitleBar(this, parent ? parent->view() : nullptr))
, Draggable(view())
, d(new Private())
, m_group(nullptr)
Expand Down
6 changes: 3 additions & 3 deletions tests/core/tst_dockwidget.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -52,7 +52,7 @@ KDDW_QCORO_TASK tst_setGuestView()
CHECK(dw->guestView());
CHECK(dw->view());
dw->view()->show();
KDDW_CO_AWAIT Platform::instance()->tests_wait(500);
KDDW_CO_AWAIT Platform::instance() -> tests_wait(500);

CHECK(guest->controller());
CHECK(dw->floatingWindow());
Expand Down Expand Up @@ -187,7 +187,7 @@ KDDW_QCORO_TASK tst_dwCloseAndReopen()
}

// 1 event loop for DelayedDelete. Avoids LSAN warnings.
KDDW_CO_AWAIT Platform::instance()->tests_wait(1);
KDDW_CO_AWAIT Platform::instance() -> tests_wait(1);

KDDW_TEST_RETURN(true);
}
Expand All @@ -203,7 +203,7 @@ KDDW_QCORO_TASK tst_setSize()
}

// 1 event loop for DelayedDelete. Avoids LSAN warnings.
KDDW_CO_AWAIT Platform::instance()->tests_wait(1);
KDDW_CO_AWAIT Platform::instance() -> tests_wait(1);

KDDW_TEST_RETURN(true);
}
Expand Down
2 changes: 1 addition & 1 deletion tests/core/tst_droparea.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -54,7 +54,7 @@ KDDW_QCORO_TASK tst_addWidgetHidden()

auto group = dw->dptr()->group();
delete dw;
KDDW_CO_AWAIT Core::Platform::instance()->tests_waitForDeleted(group);
KDDW_CO_AWAIT Core::Platform::instance() -> tests_waitForDeleted(group);

KDDW_TEST_RETURN(true);
}
Expand Down
2 changes: 1 addition & 1 deletion tests/core/tst_floatingwindow.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -38,7 +38,7 @@ KDDW_QCORO_TASK tst_floatingWindowCtor()
CHECK(dw->floatingWindow());

/// Wait for FloatingWindow to be created
KDDW_CO_AWAIT Platform::instance()->tests_wait(100);
KDDW_CO_AWAIT Platform::instance() -> tests_wait(100);

auto rootView = dw->view()->rootView();
CHECK(rootView);
Expand Down
2 changes: 1 addition & 1 deletion tests/core/tst_tabbar.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -205,7 +205,7 @@ KDDW_QCORO_TASK tst_tabBarDWClosed()
}

// 1 event loop for DelayedDelete. Avoids LSAN warnings.
KDDW_CO_AWAIT Platform::instance()->tests_wait(1);
KDDW_CO_AWAIT Platform::instance() -> tests_wait(1);

KDDW_TEST_RETURN(true);
}
Expand Down
6 changes: 3 additions & 3 deletions tests/qtquick/tst_qtquick.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -209,7 +209,7 @@ void TestQtQuick::tst_isFloatingIsEmitted()
}

// 1 event loop for DelayedDelete. Avoids LSAN warnings.
KDDW_CO_AWAIT Platform::instance()->tests_wait(1);
KDDW_CO_AWAIT Platform::instance() -> tests_wait(1);
}

void TestQtQuick::tst_shutdownCrash()
Expand Down Expand Up @@ -304,7 +304,7 @@ void TestQtQuick::tst_childQmlContext()
}

// 1 event loop for DelayedDelete. Avoids LSAN warnings.
KDDW_CO_AWAIT Platform::instance()->tests_wait(1);
KDDW_CO_AWAIT Platform::instance() -> tests_wait(1);
}

void TestQtQuick::tst_focusBetweenTabs()
Expand All @@ -321,7 +321,7 @@ void TestQtQuick::tst_focusBetweenTabs()
auto floatingDock = DockRegistry::self()->dockByName("floatingDock");

dock1->view()->rootView()->activateWindow();
KDDW_CO_AWAIT Platform::instance()->tests_wait(2000);
KDDW_CO_AWAIT Platform::instance() -> tests_wait(2000);
dock1->dptr()->group()->focus();

QVERIFY(dock1->isFocused());
Expand Down
6 changes: 3 additions & 3 deletions tests/qtwidgets/tst_qtwidgets.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -2361,14 +2361,14 @@ void TestQtWidgets::tst_focusBetweenTabs()
leFloating->setFocus();
QVERIFY(dock3->dockWidget()->isCurrentTab());
m1->view()->activateWindow();
KDDW_CO_AWAIT Platform::instance()->tests_wait(1);
KDDW_CO_AWAIT Platform::instance() -> tests_wait(1);
le3->setFocus();

QVERIFY(le3->hasFocus());
dock2->setAsCurrentTab();
QVERIFY(dock2->dockWidget()->isCurrentTab());
le2->setFocus();
KDDW_CO_AWAIT Platform::instance()->tests_wait(1);
KDDW_CO_AWAIT Platform::instance() -> tests_wait(1);
QVERIFY(le2->hasFocus());

// 2. Now, cycling tabs should toggle focus between le2 and le3
Expand All @@ -2394,7 +2394,7 @@ void TestQtWidgets::tst_focusBetweenTabs()
auto titlebarFloating = floatingDock->actualTitleBar()->view();
QVERIFY(titlebarFloating->isVisible());
titlebarFloating->setFocus(Qt::MouseFocusReason);
KDDW_CO_AWAIT Platform::instance()->tests_wait(1000);
KDDW_CO_AWAIT Platform::instance() -> tests_wait(1000);

QVERIFY(leFloating->hasFocus());
QVERIFY(!le1->hasFocus());
Expand Down
Loading

0 comments on commit cd6a334

Please sign in to comment.