forked from qt-creator/qt-creator
Fix logical XOR
The '^' is the bitwise XOR, we should use logical XOR in these contexts. The operator!=() should serve for it. More info and reasoning: https://stackoverflow.com/questions/24542 Change-Id: I1bd70bdcab25455f409594f0f14c209d1de11d18 Reviewed-by: David Schulz <david.schulz@qt.io> Reviewed-by: hjk <hjk@qt.io> Reviewed-by: <github-actions-qt-creator@cristianadam.eu>
This commit is contained in:
@@ -999,7 +999,7 @@ void PerspectivePrivate::restoreLayout()
|
||||
if (op.operationType != Perspective::Raise) {
|
||||
op.ensureDockExists();
|
||||
QTC_ASSERT(op.dock, continue);
|
||||
const bool active = op.visibleByDefault ^ op.changedByUser();
|
||||
const bool active = op.visibleByDefault != op.changedByUser();
|
||||
op.dock->setVisible(active);
|
||||
qCDebug(perspectivesLog) << "RESTORE DOCK " << op.name() << "ACTIVE: " << active
|
||||
<< (active == op.visibleByDefault ? "DEFAULT USER" : "*** NON-DEFAULT USER");
|
||||
|
||||
Reference in New Issue
Block a user