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
/3rdparty/nick
/huagao/debug/qmake
/huagao/debug
/huagao/Win32/Debug

View File

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

View File

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