1.qt 项目配置文件更新

2.TWPP 框架部分代码调整
This commit is contained in:
lovelyyoung 2020-06-20 11:21:00 +08:00
parent 9d4a3a6e8f
commit cad96b6e21
4 changed files with 2101 additions and 2111 deletions

1
.gitignore vendored
View File

@ -3,6 +3,7 @@
################################################################################ ################################################################################
/huagao/.vs/huagaotwds/v15 /huagao/.vs/huagaotwds/v15
/3rdparty/nick
/huagao/debug/qmake /huagao/debug/qmake
/huagao/debug /huagao/debug
/huagao/Win32/Debug /huagao/Win32/Debug

View File

@ -79,7 +79,7 @@ SOURCES += huagaods.cpp \
ImageProcess/ImageApplySharpen.cpp \ ImageProcess/ImageApplySharpen.cpp \
ImageProcess/ImageProcess_Public.cpp \ ImageProcess/ImageProcess_Public.cpp \
ImageProcess/ImageApplyConcatenation.cpp \ ImageProcess/ImageApplyConcatenation.cpp \
G400ScanConfig.cpp \ GscanJsonConfig.cpp \
Sliders.cpp \ Sliders.cpp \
SmartEdit.cpp \ SmartEdit.cpp \
TabCtrlSSL.cpp \ TabCtrlSSL.cpp \
@ -134,6 +134,8 @@ HEADERS += huagaods.hpp \
ImageProcess/ImageApplySharpen.h \ ImageProcess/ImageApplySharpen.h \
ImageProcess/ImageProcess_Public.h \ ImageProcess/ImageProcess_Public.h \
ImageProcess/ImageApplyConcatenation.h \ ImageProcess/ImageApplyConcatenation.h \
GscanJsonConfig.h \
MapFinder.h \
Sliders.h \ Sliders.h \
SmartEdit.h \ SmartEdit.h \
TabCtrlSSL.h \ TabCtrlSSL.h \

View File

@ -947,7 +947,8 @@ protected:
if (xferGroup == DataGroup::Audio) { if (xferGroup == DataGroup::Audio) {
setState(DsState::XferReady); setState(DsState::XferReady);
} else { }
else {
setState(data.count() ? DsState::XferReady : DsState::Enabled); setState(data.count() ? DsState::XferReady : DsState::Enabled);
} }
} }
@ -1018,10 +1019,7 @@ protected:
/// Default implementation does nothing. /// Default implementation does nothing.
/// \param origin Identity of the caller. /// \param origin Identity of the caller.
/// \param data Pending xfers data. /// \param data Pending xfers data.
virtual Result pendingXfersStopFeeder(const Identity& origin, PendingXfers& data){ virtual Result pendingXfersStopFeeder(const Identity& origin, PendingXfers& data) = 0;
Detail::unused(origin, data);
return badProtocol();
}
/// Setup file xfer TWAIN call. /// Setup file xfer TWAIN call.
/// \param origin Identity of the caller. /// \param origin Identity of the caller.
@ -1067,40 +1065,28 @@ protected:
/// Default implementation does nothing. /// Default implementation does nothing.
/// \param origin Identity of the caller. /// \param origin Identity of the caller.
/// \param data Setup file xfer data. /// \param data Setup file xfer data.
virtual Result setupFileXferGet(const Identity& origin, SetupFileXfer& data){ virtual Result setupFileXferGet(const Identity& origin, SetupFileXfer& data) = 0;
Detail::unused(origin, data);
return badProtocol();
}
/// Get default setup file xfer TWAIN call. /// Get default setup file xfer TWAIN call.
/// Always called in correct state. /// Always called in correct state.
/// Default implementation does nothing. /// Default implementation does nothing.
/// \param origin Identity of the caller. /// \param origin Identity of the caller.
/// \param data Setup file xfer data. /// \param data Setup file xfer data.
virtual Result setupFileXferGetDefault(const Identity& origin, SetupFileXfer& data){ virtual Result setupFileXferGetDefault(const Identity& origin, SetupFileXfer& data) = 0;
Detail::unused(origin, data);
return badProtocol();
}
/// Set setup file xfer TWAIN call. /// Set setup file xfer TWAIN call.
/// Always called in correct state. /// Always called in correct state.
/// Default implementation does nothing. /// Default implementation does nothing.
/// \param origin Identity of the caller. /// \param origin Identity of the caller.
/// \param data Setup file xfer data. /// \param data Setup file xfer data.
virtual Result setupFileXferSet(const Identity& origin, SetupFileXfer& data){ virtual Result setupFileXferSet(const Identity& origin, SetupFileXfer& data) = 0;
Detail::unused(origin, data);
return badProtocol();
}
/// Reset setup file xfer TWAIN call. /// Reset setup file xfer TWAIN call.
/// Always called in correct state. /// Always called in correct state.
/// Default implementation does nothing. /// Default implementation does nothing.
/// \param origin Identity of the caller. /// \param origin Identity of the caller.
/// \param data Setup file xfer data. /// \param data Setup file xfer data.
virtual Result setupFileXferReset(const Identity& origin, SetupFileXfer& data){ virtual Result setupFileXferReset(const Identity& origin, SetupFileXfer& data) = 0;
Detail::unused(origin, data);
return badProtocol();
}
/// Setup memory xfer TWAIN call. /// Setup memory xfer TWAIN call.
/// \param origin Identity of the caller. /// \param origin Identity of the caller.
@ -1464,10 +1450,7 @@ protected:
/// Default implementation does nothing. /// Default implementation does nothing.
/// Always called in correct state. /// Always called in correct state.
/// \param origin Identity of the caller. /// \param origin Identity of the caller.
virtual Result imageFileXferGet(const Identity& origin){ virtual Result imageFileXferGet(const Identity& origin) = 0;
Detail::unused(origin);
return badProtocol();
}
/// Image info TWAIN call. /// Image info TWAIN call.
/// \param origin Identity of the caller. /// \param origin Identity of the caller.
@ -1997,9 +1980,11 @@ private:
return isCapability return isCapability
? callCapability(*origin, dg, dat, msg, data) ? callCapability(*origin, dg, dat, msg, data)
: call(*origin, dg, dat, msg, data); : call(*origin, dg, dat, msg, data);
} catch (const std::bad_alloc&){ }
catch (const std::bad_alloc&) {
return { ReturnCode::Failure, ConditionCode::LowMemory }; return { ReturnCode::Failure, ConditionCode::LowMemory };
} catch (...){ }
catch (...) {
// the exception would be caught in the static handler below // the exception would be caught in the static handler below
// that would set static status, we want to set local one // that would set static status, we want to set local one
return bummer(); return bummer();
@ -2173,10 +2158,12 @@ public:
g_lastStatus = rc.status(); g_lastStatus = rc.status();
return rc.returnCode(); return rc.returnCode();
} catch (const std::bad_alloc&) { }
catch (const std::bad_alloc&) {
g_lastStatus = ConditionCode::LowMemory; g_lastStatus = ConditionCode::LowMemory;
return ReturnCode::Failure; return ReturnCode::Failure;
} catch (...){ }
catch (...) {
// we can't throw exceptions out of data sources // we can't throw exceptions out of data sources
// the C interface can't really handle them // the C interface can't really handle them
// especially when there are different implementations // especially when there are different implementations