Commit 17ef14cb authored by Ahmad Samir's avatar Ahmad Samir
Browse files

Initialize members in-class

parent f178b362
......@@ -65,46 +65,6 @@ static const int ZMODEM_BUFFER_SIZE = 1048576; // 1 Mb
Session::Session(QObject *parent)
: QObject(parent)
, _uniqueIdentifier(QUuid())
, _shellProcess(nullptr)
, _emulation(nullptr)
, _views(QList<TerminalDisplay *>())
, _monitorActivity(false)
, _monitorSilence(false)
, _notifiedActivity(false)
, _silenceSeconds(10)
, _silenceTimer(nullptr)
, _activityTimer(nullptr)
, _autoClose(true)
, _closePerUserRequest(false)
, _nameTitle(QString())
, _displayTitle(QString())
, _userTitle(QString())
, _localTabTitleFormat(QString())
, _remoteTabTitleFormat(QString())
, _tabTitleSetByUser(false)
, _tabColorSetByUser(false)
, _iconName(QString())
, _iconText(QString())
, _addToUtmp(true)
, _flowControlEnabled(true)
, _program(QString())
, _arguments(QStringList())
, _environment(QStringList())
, _sessionId(0)
, _initialWorkingDir(QString())
, _currentWorkingDir(QString())
, _reportedWorkingUrl(QUrl())
, _sessionProcessInfo(nullptr)
, _foregroundProcessInfo(nullptr)
, _foregroundPid(0)
, _zmodemBusy(false)
, _zmodemProc(nullptr)
, _zmodemProgress(nullptr)
, _hasDarkBackground(false)
, _preferredSize(QSize())
, _readOnly(false)
, _isPrimaryScreen(true)
{
_uniqueIdentifier = QUuid::createUuid();
......
......@@ -809,26 +809,26 @@ private:
QUuid _uniqueIdentifier; // SHELL_SESSION_ID
Pty *_shellProcess;
Emulation *_emulation;
Pty *_shellProcess = nullptr;
Emulation *_emulation = nullptr;
QList<TerminalDisplay *> _views;
// monitor activity & silence
bool _monitorActivity;
bool _monitorSilence;
bool _notifiedActivity;
int _silenceSeconds;
QTimer *_silenceTimer;
QTimer *_activityTimer;
bool _monitorActivity = false;
bool _monitorSilence = false;
bool _notifiedActivity = false;
int _silenceSeconds = 10;
QTimer *_silenceTimer = nullptr;
QTimer *_activityTimer = nullptr;
void setPendingNotification(Notification notification, bool enable = true);
void handleActivity();
Notifications _activeNotifications;
bool _autoClose;
bool _closePerUserRequest;
bool _autoClose = true;
bool _closePerUserRequest = false;
QString _nameTitle;
QString _displayTitle;
......@@ -838,41 +838,41 @@ private:
QString _remoteTabTitleFormat;
QColor _tabColor;
bool _tabTitleSetByUser;
bool _tabColorSetByUser;
bool _tabTitleSetByUser = false;
bool _tabColorSetByUser = false;
QString _iconName;
QString _iconText; // not actually used
bool _addToUtmp;
bool _flowControlEnabled;
bool _addToUtmp = true;
bool _flowControlEnabled = true;
QString _program;
QStringList _arguments;
QStringList _environment;
int _sessionId;
int _sessionId = 0;
QString _initialWorkingDir;
QString _currentWorkingDir;
QUrl _reportedWorkingUrl;
ProcessInfo *_sessionProcessInfo;
ProcessInfo *_foregroundProcessInfo;
int _foregroundPid;
ProcessInfo *_sessionProcessInfo = nullptr;
ProcessInfo *_foregroundProcessInfo = nullptr;
int _foregroundPid = 0;
// ZModem
bool _zmodemBusy;
KProcess *_zmodemProc;
ZModemDialog *_zmodemProgress;
bool _zmodemBusy = false;
KProcess *_zmodemProc = nullptr;
ZModemDialog *_zmodemProgress = nullptr;
bool _hasDarkBackground;
bool _hasDarkBackground = false;
QSize _preferredSize;
bool _readOnly;
bool _readOnly = false;
static int lastSessionId;
bool _isPrimaryScreen;
bool _isPrimaryScreen = true;
QString _currentHostName;
};
......
Supports Markdown
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment