mirror of
https://github.com/tnodir/fort
synced 2024-11-15 11:55:09 +00:00
UI: Services: Fix list loading.
This commit is contained in:
parent
f42fc60147
commit
f42e9e1ecb
@ -20,6 +20,8 @@ ServicesPage::ServicesPage(OptionsController *ctrl, QWidget *parent) :
|
|||||||
OptBasePage(ctrl, parent), m_serviceListModel(new ServiceListModel(this))
|
OptBasePage(ctrl, parent), m_serviceListModel(new ServiceListModel(this))
|
||||||
{
|
{
|
||||||
setupUi();
|
setupUi();
|
||||||
|
|
||||||
|
serviceListModel()->initialize();
|
||||||
}
|
}
|
||||||
|
|
||||||
ServiceInfoManager *ServicesPage::serviceInfoManager() const
|
ServiceInfoManager *ServicesPage::serviceInfoManager() const
|
||||||
@ -132,7 +134,7 @@ void ServicesPage::setupTableServiceListHeader()
|
|||||||
header->setSectionResizeMode(1, QHeaderView::Stretch);
|
header->setSectionResizeMode(1, QHeaderView::Stretch);
|
||||||
header->setSectionResizeMode(2, QHeaderView::Interactive);
|
header->setSectionResizeMode(2, QHeaderView::Interactive);
|
||||||
|
|
||||||
header->resizeSection(0, 100);
|
header->resizeSection(0, 250);
|
||||||
header->resizeSection(1, 350);
|
header->resizeSection(1, 350);
|
||||||
header->resizeSection(2, 90);
|
header->resizeSection(2, 90);
|
||||||
}
|
}
|
||||||
|
@ -17,7 +17,8 @@ QVector<ServiceInfo> getServiceInfoList(SC_HANDLE mngr)
|
|||||||
|
|
||||||
while (EnumServicesStatusExW(mngr, SC_ENUM_PROCESS_INFO, SERVICE_WIN32, SERVICE_STATE_ALL,
|
while (EnumServicesStatusExW(mngr, SC_ENUM_PROCESS_INFO, SERVICE_WIN32, SERVICE_STATE_ALL,
|
||||||
(LPBYTE) buffer, sizeof(buffer), &bytesRemaining, &serviceCount, &resumePoint,
|
(LPBYTE) buffer, sizeof(buffer), &bytesRemaining, &serviceCount, &resumePoint,
|
||||||
nullptr)) {
|
nullptr)
|
||||||
|
|| GetLastError() == ERROR_MORE_DATA) {
|
||||||
|
|
||||||
int infoIndex = infoList.size();
|
int infoIndex = infoList.size();
|
||||||
infoList.resize(infoIndex + serviceCount);
|
infoList.resize(infoIndex + serviceCount);
|
||||||
|
Loading…
Reference in New Issue
Block a user