parent
3054fa1599
commit
2482eba7de
|
@ -18,6 +18,8 @@
|
|||
|
||||
#include "gui/scanprogressdialog.h"
|
||||
|
||||
#include <QCloseEvent>
|
||||
|
||||
#include <KLocalizedString>
|
||||
|
||||
ScanProgressDialog::ScanProgressDialog(QWidget* parent) :
|
||||
|
@ -30,6 +32,11 @@ ScanProgressDialog::ScanProgressDialog(QWidget* parent) :
|
|||
setAttribute(Qt::WA_ShowModal, true);
|
||||
}
|
||||
|
||||
void ScanProgressDialog::closeEvent(QCloseEvent* e)
|
||||
{
|
||||
e->ignore();
|
||||
}
|
||||
|
||||
void ScanProgressDialog::setDeviceName(const QString& d)
|
||||
{
|
||||
if (d.isEmpty())
|
||||
|
@ -40,7 +47,7 @@ void ScanProgressDialog::setDeviceName(const QString& d)
|
|||
|
||||
void ScanProgressDialog::showEvent(QShowEvent* e)
|
||||
{
|
||||
setCancelButton(0);
|
||||
setCancelButton(nullptr);
|
||||
|
||||
QProgressDialog::showEvent(e);
|
||||
}
|
||||
|
|
|
@ -15,8 +15,7 @@
|
|||
* along with this program. If not, see <http://www.gnu.org/licenses/>.*
|
||||
*************************************************************************/
|
||||
|
||||
#if !defined(SCANPROGRESSDIALOG_H)
|
||||
|
||||
#ifndef SCANPROGRESSDIALOG_H
|
||||
#define SCANPROGRESSDIALOG_H
|
||||
|
||||
#include <QProgressDialog>
|
||||
|
@ -34,6 +33,7 @@ public:
|
|||
void setDeviceName(const QString& d);
|
||||
|
||||
protected:
|
||||
void closeEvent(QCloseEvent* e) override;
|
||||
void showEvent(QShowEvent* e) override;
|
||||
|
||||
};
|
||||
|
|
Loading…
Reference in New Issue