Skip to content

Commit

Permalink
Revert "UMVE: Fix Qt 5.15 deprecation warnings"
Browse files Browse the repository at this point in the history
This reverts commit 877e0a3.
  • Loading branch information
andre-schulz committed Jul 21, 2024
1 parent d3046fe commit 91e9369
Show file tree
Hide file tree
Showing 3 changed files with 4 additions and 5 deletions.
3 changes: 1 addition & 2 deletions apps/umve/batchoperations.cc
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,6 @@
#include <QMessageBox>
#include <QProgressDialog>
#include <QApplication>
#include <QAbstractEventDispatcher>

#include "util/file_system.h"
#include "mve/mesh_io_ply.h"
Expand Down Expand Up @@ -550,7 +549,7 @@ BatchGenerateThumbs::on_generate (void)
return;

this->setDisabled(true);
while (QApplication::eventDispatcher()->hasPendingEvents())
while (QApplication::hasPendingEvents())
QApplication::processEvents();

std::string embedding_name = this->embedding_name.text().toStdString();
Expand Down
2 changes: 1 addition & 1 deletion apps/umve/sceneoverview.cc
Original file line number Diff line number Diff line change
Expand Up @@ -147,7 +147,7 @@ SceneOverview::add_view_to_layout (std::size_t id, mve::View::Ptr view)
QListWidgetItem* item = new QListWidgetItem(icon,
tr("%1\n%2").arg(name, images));
if (!cam_valid)
item->setBackground(QColor(255, 221, 221)); // #ffdddd
item->setBackgroundColor(QColor(255, 221, 221)); // #ffdddd
item->setData(Qt::UserRole, (int)id);
this->viewlist->addItem(item);
}
Expand Down
4 changes: 2 additions & 2 deletions apps/umve/viewinspect/viewinspect.cc
Original file line number Diff line number Diff line change
Expand Up @@ -229,7 +229,7 @@ ViewInspect::show_details (bool show)
void
ViewInspect::update_actions (void)
{
bool active = !!this->scroll_image->get_pixmap();
bool active = this->scroll_image->get_pixmap() != nullptr;
this->action_zoom_fit->setEnabled(active);
this->action_zoom_in->setEnabled(active);
this->action_zoom_out->setEnabled(active);
Expand Down Expand Up @@ -700,7 +700,7 @@ ViewInspect::on_ply_export (void)
void
ViewInspect::on_image_export (void)
{
if (!this->scroll_image->get_image()->pixmap(Qt::ReturnByValue))
if (!this->scroll_image->get_image()->pixmap())
{
QMessageBox::critical(this, "Cannot save image", "No such image");
return;
Expand Down

0 comments on commit 91e9369

Please sign in to comment.