diff --git a/app/SysTray-X/windowctrl-win.cpp b/app/SysTray-X/windowctrl-win.cpp index ef7e214..fcd5870 100644 --- a/app/SysTray-X/windowctrl-win.cpp +++ b/app/SysTray-X/windowctrl-win.cpp @@ -100,7 +100,7 @@ Preferences::MinimizeType WindowCtrlWin::getMinimizeType() const /* * Get the parent pid of SysTray-X, TB hopefully */ -qint64 WindowCtrlWin::getPpid() +qint64 WindowCtrlWin::getPpid() const { HANDLE h = CreateToolhelp32Snapshot( TH32CS_SNAPPROCESS, 0 ); PROCESSENTRY32 pe; @@ -131,7 +131,7 @@ qint64 WindowCtrlWin::getPpid() /* * Is the pid from thunderbird */ -bool WindowCtrlWin::isThunderbird( qint64 pid ) +bool WindowCtrlWin::isThunderbird( qint64 pid ) const { return getProcessName( pid ).contains( "thunderbird", Qt::CaseInsensitive ); } @@ -140,7 +140,7 @@ bool WindowCtrlWin::isThunderbird( qint64 pid ) /* * Get the process name */ -QString WindowCtrlWin::getProcessName( qint64 pid ) +QString WindowCtrlWin::getProcessName( qint64 pid ) const { HANDLE proc = OpenProcess( PROCESS_QUERY_INFORMATION | PROCESS_VM_READ, false, pid ); char name[ 256 ]; diff --git a/app/SysTray-X/windowctrl-win.h b/app/SysTray-X/windowctrl-win.h index 2db7905..b42f6fc 100644 --- a/app/SysTray-X/windowctrl-win.h +++ b/app/SysTray-X/windowctrl-win.h @@ -97,7 +97,7 @@ class WindowCtrlWin : public QObject * * @return The ppid */ - qint64 getPpid(); + qint64 getPpid() const; /** * @brief isThunderbird. Is this a thunderbird pid. @@ -106,7 +106,7 @@ class WindowCtrlWin : public QObject * * @return True if this is thunderbird. */ - bool isThunderbird( qint64 pid ); + bool isThunderbird( qint64 pid ) const; /** * @brief getProcessName. Get the name of the proces by pid. @@ -115,7 +115,7 @@ class WindowCtrlWin : public QObject * * @return The process name. */ - QString getProcessName( qint64 pid ); + QString getProcessName( qint64 pid ) const; /** * @brief findWindow. Find window by title.