解决第二次扫描进度指示器对象未重新创建导致崩溃的问题
This commit is contained in:
parent
8775e35d8f
commit
7ac69fea99
|
@ -54,7 +54,7 @@ win32 {
|
||||||
LIBS += -lgdi32 -lgdiplus -ldbghelp -luser32 -ladvapi32
|
LIBS += -lgdi32 -lgdiplus -ldbghelp -luser32 -ladvapi32
|
||||||
LIBS += -L$$PWD/../../build/$${MY_OS}/$${OEM_NAME}/$${MY_ARCH}/$${MY_CONFIGURE} -l$${OEM_PREFIX}Base -l$${OEM_PREFIX}ImgFmt \
|
LIBS += -L$$PWD/../../build/$${MY_OS}/$${OEM_NAME}/$${MY_ARCH}/$${MY_CONFIGURE} -l$${OEM_PREFIX}Base -l$${OEM_PREFIX}ImgFmt \
|
||||||
-l$${OEM_PREFIX}ImgProc -l$${OEM_PREFIX}Version
|
-l$${OEM_PREFIX}ImgProc -l$${OEM_PREFIX}Version
|
||||||
LIBS += -L$$PWD/../../../../sdk/lib/win/$${MY_ARCH}/OEM/$${OEM_NAME} -lsane
|
LIBS += -L$$PWD/../../../../sdk/lib/win/$${MY_ARCH}/OEM/$${OEM_NAME} -lsanexy
|
||||||
|
|
||||||
# sane.dll
|
# sane.dll
|
||||||
LIBS += -L$$PWD/../../../../release/win/$${MY_ARCH}/OEM/$${OEM_NAME}
|
LIBS += -L$$PWD/../../../../release/win/$${MY_ARCH}/OEM/$${OEM_NAME}
|
||||||
|
|
|
@ -53,7 +53,7 @@ win32 {
|
||||||
DEF_FILE = HGScannerLib.def
|
DEF_FILE = HGScannerLib.def
|
||||||
LIBS += -lgdi32 -lgdiplus -ldbghelp
|
LIBS += -lgdi32 -lgdiplus -ldbghelp
|
||||||
LIBS += -L$$PWD/../../build/$${MY_OS}/$${OEM_NAME}/$${MY_ARCH}/$${MY_CONFIGURE} -l$${OEM_PREFIX}Base -l$${OEM_PREFIX}ImgFmt -l$${OEM_PREFIX}ImgProc
|
LIBS += -L$$PWD/../../build/$${MY_OS}/$${OEM_NAME}/$${MY_ARCH}/$${MY_CONFIGURE} -l$${OEM_PREFIX}Base -l$${OEM_PREFIX}ImgFmt -l$${OEM_PREFIX}ImgProc
|
||||||
LIBS += -L$$PWD/../../../../sdk/lib/win/$${MY_ARCH}/OEM/$${OEM_NAME} -lsane
|
LIBS += -L$$PWD/../../../../sdk/lib/win/$${MY_ARCH}/OEM/$${OEM_NAME} -lsanexy
|
||||||
}
|
}
|
||||||
|
|
||||||
unix {
|
unix {
|
||||||
|
|
|
@ -60,7 +60,7 @@ win32 {
|
||||||
|
|
||||||
LIBS += -lgdi32 -lgdiplus -ldbghelp -lws2_32 -lShell32 -lUser32 -lwldap32 -lAdvapi32
|
LIBS += -lgdi32 -lgdiplus -ldbghelp -lws2_32 -lShell32 -lUser32 -lwldap32 -lAdvapi32
|
||||||
LIBS += -L$$PWD/../../build/$${MY_OS}/$${OEM_NAME}/$${MY_ARCH}/$${MY_CONFIGURE} -l$${OEM_PREFIX}Base -l$${OEM_PREFIX}ImgFmt -l$${OEM_PREFIX}ImgProc
|
LIBS += -L$$PWD/../../build/$${MY_OS}/$${OEM_NAME}/$${MY_ARCH}/$${MY_CONFIGURE} -l$${OEM_PREFIX}Base -l$${OEM_PREFIX}ImgFmt -l$${OEM_PREFIX}ImgProc
|
||||||
LIBS += -L$$PWD/../../../../sdk/lib/win/$${MY_ARCH}/OEM/$${OEM_NAME} -lsane
|
LIBS += -L$$PWD/../../../../sdk/lib/win/$${MY_ARCH}/OEM/$${OEM_NAME} -lsanexy
|
||||||
INCLUDEPATH += $$PWD/../../../third_party/libzip/$${MY_OS}/include
|
INCLUDEPATH += $$PWD/../../../third_party/libzip/$${MY_OS}/include
|
||||||
INCLUDEPATH += $$PWD/../../../third_party/libcurl/$${MY_OS}/include
|
INCLUDEPATH += $$PWD/../../../third_party/libcurl/$${MY_OS}/include
|
||||||
LIBS += $$PWD/../../../third_party/zlib/$${MY_OS}/lib/$${MY_ARCH}/zlib.lib
|
LIBS += $$PWD/../../../third_party/zlib/$${MY_OS}/lib/$${MY_ARCH}/zlib.lib
|
||||||
|
|
|
@ -337,8 +337,9 @@ void Manager::on_createSettingUi(bool qt)
|
||||||
m_settingUiCallback(r);
|
m_settingUiCallback(r);
|
||||||
};
|
};
|
||||||
|
|
||||||
if (m_settingUi == nullptr)
|
if (m_settingUi != nullptr)
|
||||||
m_settingUi = new hg_settingdialog(this, m_device, &m_api, m_with_scan, m_devName.c_str(), scanner_cfg_, close_prog, qParent);
|
delete m_settingUi;
|
||||||
|
m_settingUi = new hg_settingdialog(this, m_device, &m_api, m_with_scan, m_devName.c_str(), scanner_cfg_, close_prog, qParent);
|
||||||
m_settingUi->setModal(true);
|
m_settingUi->setModal(true);
|
||||||
m_settingUi->show();
|
m_settingUi->show();
|
||||||
}
|
}
|
||||||
|
@ -367,8 +368,9 @@ void Manager::on_createProgressUi(bool qt)
|
||||||
if(r == UI_RESULT_CLOSE_NORMAL)
|
if(r == UI_RESULT_CLOSE_NORMAL)
|
||||||
m_progressUiCallback = std::function<void(ui_result)>();
|
m_progressUiCallback = std::function<void(ui_result)>();
|
||||||
};
|
};
|
||||||
if (m_progressUi == nullptr)
|
if (m_progressUi != nullptr)
|
||||||
m_progressUi = new Dialog_progress_ui(this, close_prog, m_notify, qParent);
|
delete m_progressUi;
|
||||||
|
m_progressUi = new Dialog_progress_ui(this, close_prog, m_notify, qParent);
|
||||||
m_progressUi->setModal(true);
|
m_progressUi->setModal(true);
|
||||||
m_progressUi->show();
|
m_progressUi->show();
|
||||||
#ifdef HG_CMP_MSC
|
#ifdef HG_CMP_MSC
|
||||||
|
|
|
@ -18,6 +18,7 @@ Dialog_progress_ui::Dialog_progress_ui(class Manager *mgr, std::function<void (u
|
||||||
{
|
{
|
||||||
ui->setupUi(this);
|
ui->setupUi(this);
|
||||||
|
|
||||||
|
setAttribute(Qt::WA_DeleteOnClose, true);
|
||||||
#if defined(HG_CMP_MSC)
|
#if defined(HG_CMP_MSC)
|
||||||
setWindowFlags(Qt::SubWindow | Qt::Popup | Qt::WindowStaysOnTopHint);
|
setWindowFlags(Qt::SubWindow | Qt::Popup | Qt::WindowStaysOnTopHint);
|
||||||
#else
|
#else
|
||||||
|
|
Loading…
Reference in New Issue