MCPcopy Create free account
hub / github.com/Codeya-IDE/deepin-ide / updatePid

Method updatePid

src/plugins/reversedebug/loadcoredialog.cpp:117–144  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

115}
116
117void LoadCoreDialog::updatePid()
118{
119 QString traceDir = d->traceDir->text();
120 QDir dir(traceDir);
121 bool okEnabled = dir.exists();
122 getButton(1)->setEnabled(okEnabled && !traceDir.isEmpty());
123
124 // fill pid combo list here!
125 if (okEnabled) {
126 d->pidInput->clear();
127
128 dir.setFilter(QDir::Files | QDir::Hidden | QDir::NoSymLinks);
129
130 QFileInfoList list = dir.entryInfoList();
131 QString mapname = QLatin1String(MAP_FILE_NAME);
132 for (int i = 0; i < list.size(); ++i) {
133 QFileInfo fileInfo = list.at(i);
134 if (0 == fileInfo.fileName().indexOf(mapname)) {
135 d->pidInput->addItem(fileInfo.fileName().mid(mapname.size()));
136 }
137 }
138
139 d->pidInput->setCurrentIndex(0);
140 } else {
141 d->traceDir->showAlertMessage(tr("Invalid Path!"), 500);
142
143 }
144}
145
146void LoadCoreDialog::historyIndexChanged(int)
147{

Callers

nothing calls this directly

Calls 11

atMethod · 0.80
fileNameMethod · 0.80
textMethod · 0.45
existsMethod · 0.45
setEnabledMethod · 0.45
isEmptyMethod · 0.45
clearMethod · 0.45
sizeMethod · 0.45
indexOfMethod · 0.45
addItemMethod · 0.45
setCurrentIndexMethod · 0.45

Tested by

no test coverage detected