WindowController test
Create a WindowController test suite. Also make sure that the class handles m_window being nullptr.
This commit is contained in:
@@ -56,6 +56,9 @@ void WindowController::saveGeometry()
|
||||
|
||||
void WindowController::showAndRaiseWindow(const QString &startupId)
|
||||
{
|
||||
if (m_window == nullptr) {
|
||||
return;
|
||||
}
|
||||
if (!m_window->isVisible()) {
|
||||
m_window->show();
|
||||
restoreGeometry();
|
||||
@@ -104,6 +107,9 @@ void WindowController::setBlur(QQuickItem *item, bool blur)
|
||||
|
||||
void WindowController::toggleWindow()
|
||||
{
|
||||
if (m_window == nullptr) {
|
||||
return;
|
||||
}
|
||||
if (window()->isVisible()) {
|
||||
if (window()->windowStates() & Qt::WindowMinimized) {
|
||||
window()->showNormal();
|
||||
|
||||
Reference in New Issue
Block a user