mirror of
https://bitbucket.org/smil3y/katie.git
synced 2025-02-24 19:02:59 +00:00
mark the warning case in QSessionManager constructor as unlikely
Signed-off-by: Ivailo Monev <xakepa10@gmail.com>
This commit is contained in:
parent
5f4f6b6437
commit
cbcedce2c5
1 changed files with 5 additions and 5 deletions
|
@ -3726,8 +3726,9 @@ QSessionManager::QSessionManager(QApplication * app, QString &id, QString& key)
|
||||||
cb.shutdown_cancelled.client_data = (SmPointer) d;
|
cb.shutdown_cancelled.client_data = (SmPointer) d;
|
||||||
|
|
||||||
// avoid showing a warning message below
|
// avoid showing a warning message below
|
||||||
if (qgetenv("SESSION_MANAGER").isEmpty())
|
if (qgetenv("SESSION_MANAGER").isEmpty()) {
|
||||||
return;
|
return;
|
||||||
|
}
|
||||||
|
|
||||||
smcConnection = SmcOpenConnection(0, 0, 1, 0,
|
smcConnection = SmcOpenConnection(0, 0, 1, 0,
|
||||||
SmcSaveYourselfProcMask |
|
SmcSaveYourselfProcMask |
|
||||||
|
@ -3742,11 +3743,10 @@ QSessionManager::QSessionManager(QApplication * app, QString &id, QString& key)
|
||||||
id = QString::fromLatin1(myId);
|
id = QString::fromLatin1(myId);
|
||||||
::free(myId); // it was allocated by C
|
::free(myId); // it was allocated by C
|
||||||
|
|
||||||
QString error = QString::fromLocal8Bit(cerror);
|
if (Q_UNLIKELY(!smcConnection)) {
|
||||||
if (!smcConnection) {
|
const QString error = QString::fromLocal8Bit(cerror);
|
||||||
qWarning("Qt: Session management error: %s", qPrintable(error));
|
qWarning("Qt: Session management error: %s", qPrintable(error));
|
||||||
}
|
} else {
|
||||||
else {
|
|
||||||
sm_receiver = new QSmSocketReceiver(IceConnectionNumber(SmcGetIceConnection(smcConnection)));
|
sm_receiver = new QSmSocketReceiver(IceConnectionNumber(SmcGetIceConnection(smcConnection)));
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
Loading…
Add table
Reference in a new issue