Skip to content

Commit

Permalink
fix: Fixing builds with X11=OFF
Browse files Browse the repository at this point in the history
Pull request #927 from sjoblomj/fixing_builds_without_x11
  • Loading branch information
pktiuk authored Mar 3, 2024
2 parents b4fe64b + dc1ee34 commit 7006005
Show file tree
Hide file tree
Showing 2 changed files with 8 additions and 12 deletions.
16 changes: 6 additions & 10 deletions src/gui/addeditautoprofiledialog.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -328,7 +328,6 @@ void AddEditAutoProfileDialog::checkForGrabbedWindow(UnixCaptureWindowUtility *u

util->deleteLater();
}

#endif
}
#endif
Expand All @@ -339,32 +338,29 @@ void AddEditAutoProfileDialog::windowPropAssignment(CapturedWindowInfoDialog *di
disconnect(ui->winClassLineEdit, &QLineEdit::textChanged, this, &AddEditAutoProfileDialog::checkForDefaultStatus);
disconnect(ui->winNameLineEdit, &QLineEdit::textChanged, this, &AddEditAutoProfileDialog::checkForDefaultStatus);

ui->applicationLineEdit->clear();
ui->winClassLineEdit->clear();
ui->winNameLineEdit->clear();

#ifdef WITH_X11
if (dialog->useFullWindowPath() && dialog->getSelectedOptions() & CapturedWindowInfoDialog::WindowPath)
{
ui->applicationLineEdit->setText(dialog->getWindowPath());
} else if (!dialog->useFullWindowPath() && dialog->getSelectedOptions() & CapturedWindowInfoDialog::WindowPath)
{
ui->applicationLineEdit->setText(QFileInfo(dialog->getWindowPath()).fileName());
} else
{
ui->applicationLineEdit->clear();
}

if (dialog->getSelectedOptions() & CapturedWindowInfoDialog::WindowClass)
{
ui->winClassLineEdit->setText(dialog->getWindowClass());
} else
{
ui->winClassLineEdit->clear();
}

if (dialog->getSelectedOptions() & CapturedWindowInfoDialog::WindowName)
{
ui->winNameLineEdit->setText(dialog->getWindowName());
} else
{
ui->winNameLineEdit->clear();
}
#endif

checkForDefaultStatus();

Expand Down
4 changes: 2 additions & 2 deletions src/gui/buttoneditdialog.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -264,8 +264,8 @@ void ButtonEditDialog::keyReleaseEvent(QKeyEvent *event)
}

#else
int finalvirtual = 0;
int checkalias = 0;
finalvirtual = 0;
checkalias = 0;
if (QApplication::platformName() == QStringLiteral("xcb"))
{
finalvirtual = AntKeyMapper::getInstance()->returnVirtualKey(event->key());
Expand Down

0 comments on commit 7006005

Please sign in to comment.