almost captured, only to hotplug. such is life...
This commit is contained in:
parent
f92df42995
commit
44ccde6ac8
6 changed files with 235 additions and 63 deletions
|
|
@ -207,11 +207,12 @@ void MainWindow::customEvent(QEvent* ev) {
|
|||
}
|
||||
|
||||
void MainWindow::removeEndpointWidget(EndpointWidgetEvent<uint64_t>* ev){
|
||||
uint64_t i = ev->payload;
|
||||
uint64_t i = ev->payload;
|
||||
this->ews.at(i)->setParent(nullptr);
|
||||
this->layout->removeWidget(ews.at(i));
|
||||
uint64_t saisu = ews.size();
|
||||
//delete ews.at(index);
|
||||
delete ews.at(i);
|
||||
while ((i + 1) < ews.size()) {
|
||||
ews.at(i) = ews.at(i + 1);
|
||||
ews.at(i)->setIndex(i);
|
||||
|
|
@ -407,11 +408,11 @@ void MainWindow::trayIconActivated(QSystemTrayIcon::ActivationReason reason) {
|
|||
|
||||
void MainWindow::reloadEndpointWidgets() {
|
||||
size_t i = 0;
|
||||
for (size_t epwIndex = 0; i < (osh->getEndpointHandlers().size()); i++) {
|
||||
if (osh->getEndpointHandlers().at(i)->getState() == EndpointState::ENDPOINT_ACTIVE){
|
||||
for (size_t epwIndex = 0; i < (osh->getPlaybackEndpointHandlers().size()); i++) {
|
||||
if (osh->getPlaybackEndpointHandlers().at(i)->getState() == EndpointState::ENDPOINT_ACTIVE){
|
||||
log_debugcpp("EPWidget creation");
|
||||
//osh->getEndpointHandlers().at(i)->getCallbackInfo()->caller = osh->getGuid();
|
||||
EndpointWidget *epw = new EndpointWidget(epwIndex, osh->getEndpointHandlers().at(i), widget);
|
||||
//osh->getPlaybackEndpointHandlers().at(i)->getCallbackInfo()->caller = osh->getGuid();
|
||||
EndpointWidget *epw = new EndpointWidget(epwIndex, osh->getPlaybackEndpointHandlers().at(i), widget);
|
||||
epwIndex++;
|
||||
//alfinal estoes solopara inicializarlmao
|
||||
ews.push_back(epw);
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue