Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
15 changes: 12 additions & 3 deletions src/ui/MainWindow.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -3053,6 +3053,12 @@ QList<MainWindow::PanelEintrag> MainWindow::panelEintraege()
return eintraege;
}

void MainWindow::sichereProfilNachVersteckt(const QString& id)
{
Q_UNUSED(id);
if (m_layoutProfileManager) { m_layoutProfileManager->saveActiveProfileState(); }
}

void MainWindow::setzePanelSichtbar(const QString& id, bool sichtbar)
{
if (!m_panelLayoutManager) { return; }
Expand Down Expand Up @@ -3090,9 +3096,12 @@ void MainWindow::setzePanelSchwebend(const QString& id, bool schwebend)
if (!panel->isVisible()) { panel->setVisible(true); }
// Das ✕ am schwebenden Panel sichert das Profil -- einmal
// verdrahtet, so oft es will.
connect(panel, &PanelContainerWidget::versteckt, this, [this](const QString&) {
if (m_layoutProfileManager) { m_layoutProfileManager->saveActiveProfileState(); }
}, Qt::UniqueConnection);
// Qt::UniqueConnection geht nur mit einem Member-Zeiger -- mit
// einem Lambda lehnt Qt die Verbindung ab (Warnung "unique
// connections require a pointer to member function"), und das
// ✕ sicherte seit #74 nie. Gesehen am 2026-11-05 im Longpath-Log.
connect(panel, &PanelContainerWidget::versteckt,
this, &MainWindow::sichereProfilNachVersteckt, Qt::UniqueConnection);
m_panelLayoutManager->setPanelFloating(id, true);
// Ein nie gezeigtes Hauptfenster hat keine ausgelegte Flaeche:
// das Panel kaeme mit der Groesse 0x0 daher. Dann die Groesse
Expand Down
2 changes: 2 additions & 0 deletions src/ui/MainWindow.h
Original file line number Diff line number Diff line change
Expand Up @@ -149,6 +149,8 @@ class MainWindow : public QMainWindow {
void restartRequested();

private slots:
// Das ✕ am schwebenden Panel sichert das Profil (siehe setzePanelSchwebend).
void sichereProfilNachVersteckt(const QString& id);
void handleLogRequested();
void recheckDupeIndicator();
void openSettingsDialog();
Expand Down
5 changes: 5 additions & 0 deletions tests/test_einbettung.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -19,6 +19,7 @@
#include <QPushButton>
#include <QMainWindow>
#include <QMenuBar>
#include <QRegularExpression>
#include <QVBoxLayout>
#include <QSignalSpy>

Expand Down Expand Up @@ -241,6 +242,10 @@ void TestEinbettung::rahmenlosSchwebendIstEckigMitRueckweg()
// wieder sichtbar hervor.
void TestEinbettung::geschwisterDesOberstenFenstersUndDasKreuz()
{
// 2026-11-05: die Verbindung fuer das ✕ war mit Qt::UniqueConnection
// und Lambda -- Qt lehnt das ab, das ✕ sicherte nie. Jede solche
// Warnung ist hier ein Fehler.
QTest::failOnWarning(QRegularExpression(QStringLiteral("unique connections")));
QTemporaryDir ordner;
QVERIFY(ordner.isValid());
AppController controller;
Expand Down
Loading