Skip to content
Projects
Groups
Snippets
Help
This project
Loading...
Sign in / Register
Toggle navigation
S
sbkpay
Overview
Overview
Details
Activity
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Wiki
Wiki
Snippets
Snippets
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
zhenfei.zhang
sbkpay
Commits
43373054
Commit
43373054
authored
Sep 11, 2017
by
李定达
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
1.真正修复日志重印bug
parent
05e35493
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
36 additions
and
17 deletions
+36
-17
sbkpay/hostwidget.cpp
+1
-1
sbkpay/main.cpp
+34
-15
sbkpay/sbkpay.pro.user
+1
-1
No files found.
sbkpay/hostwidget.cpp
View file @
43373054
...
@@ -34,7 +34,7 @@ HostWidget::HostWidget(QWidget *parent) :
...
@@ -34,7 +34,7 @@ HostWidget::HostWidget(QWidget *parent) :
connect
(
&
_intertime
,
&
QTimer
::
timeout
,
this
,
[
this
](){
connect
(
&
_intertime
,
&
QTimer
::
timeout
,
this
,
[
this
](){
if
(
!
_need_exit
)
if
(
!
_need_exit
)
{
{
ui
->
label_pay_
money
->
setText
(
QString
::
fromLocal8Bit
(
"
等待用户输入密码"
));
ui
->
label_pay_
title
->
setText
(
QString
::
fromLocal8Bit
(
"支付中/
等待用户输入密码"
));
ui
->
btn_pay_exitint
->
show
();
ui
->
btn_pay_exitint
->
show
();
}
}
});
});
...
...
sbkpay/main.cpp
View file @
43373054
...
@@ -40,6 +40,25 @@ BOOL WINAPI DllMain( HINSTANCE hInstance, DWORD dwReason, LPVOID /*lpvReserved*/
...
@@ -40,6 +40,25 @@ BOOL WINAPI DllMain( HINSTANCE hInstance, DWORD dwReason, LPVOID /*lpvReserved*/
qDebug
()
<<
"****************** currpath *******************88"
<<
QDir
::
currentPath
();
qDebug
()
<<
"****************** currpath *******************88"
<<
QDir
::
currentPath
();
ownApplication
=
QMfcApp
::
pluginInstance
(
hInstance
);
ownApplication
=
QMfcApp
::
pluginInstance
(
hInstance
);
char
tmppath
[
MAX_PATH
]
=
{
0
};
ToolS
::
GetProcPath
(
tmppath
);
QString
logDir
=
QString
(
"%1/log"
).
arg
(
QString
(
tmppath
));
QDir
().
mkdir
(
logDir
);
QsLogging
::
Logger
&
logger
=
QsLogging
::
Logger
::
instance
();
logger
.
setLoggingLevel
(
QsLogging
::
TraceLevel
);
QString
str
=
QString
(
tmppath
)
+
"
\\
log
\\
sbuxpay.txt"
;
/* 配置输出定向器 */
QsLogging
::
DestinationPtr
fileDestination
(
QsLogging
::
DestinationFactory
::
MakeFileDestination
(
str
,
QsLogging
::
EnableLogRotation
,
QsLogging
::
MaxSizeBytes
(
1024
*
1024
),
QsLogging
::
MaxOldLogCount
(
5
)));
logger
.
addDestination
(
fileDestination
);
QsLogging
::
DestinationPtr
consleDest
(
QsLogging
::
DestinationFactory
::
MakeDebugOutputDestination
());
logger
.
addDestination
(
consleDest
);
}
}
if
(
dwReason
==
DLL_PROCESS_DETACH
&&
ownApplication
)
if
(
dwReason
==
DLL_PROCESS_DETACH
&&
ownApplication
)
delete
qApp
;
delete
qApp
;
...
@@ -52,24 +71,24 @@ extern "C" __declspec(dllexport) void Start(const char *indata, char *outdata)
...
@@ -52,24 +71,24 @@ extern "C" __declspec(dllexport) void Start(const char *indata, char *outdata)
HWND
parent
=
GetDesktopWindow
();
HWND
parent
=
GetDesktopWindow
();
QWinWidget
win
(
parent
);
QWinWidget
win
(
parent
);
char
path
[
MAX_PATH
]
=
{
0
};
//
char path[MAX_PATH] = {0};
ToolS
::
GetProcPath
(
path
);
//
ToolS::GetProcPath(path);
QString
logDir
=
QString
(
"%1/log"
).
arg
(
QString
(
path
));
//
QString logDir = QString("%1/log").arg(QString(path));
QDir
().
mkdir
(
logDir
);
//
QDir().mkdir(logDir);
QsLogging
::
Logger
&
logger
=
QsLogging
::
Logger
::
instance
();
//
QsLogging::Logger& logger = QsLogging::Logger::instance();
logger
.
setLoggingLevel
(
QsLogging
::
TraceLevel
);
//
logger.setLoggingLevel(QsLogging::TraceLevel);
QString
str
=
QString
(
path
)
+
"
\\
log
\\
sbuxpay.txt"
;
//
QString str = QString(path) + "\\log\\sbuxpay.txt";
/* 配置输出定向器 */
//
/* 配置输出定向器 */
static
QsLogging
::
DestinationPtr
fileDestination
(
QsLogging
::
DestinationFactory
::
MakeFileDestination
(
//
QsLogging::DestinationPtr fileDestination(QsLogging::DestinationFactory::MakeFileDestination(
str
,
//
str,
QsLogging
::
EnableLogRotation
,
QsLogging
::
MaxSizeBytes
(
1024
*
1024
),
//
QsLogging::EnableLogRotation, QsLogging::MaxSizeBytes(1024*1024),
QsLogging
::
MaxOldLogCount
(
5
)));
//
QsLogging::MaxOldLogCount(5)));
logger
.
addDestination
(
fileDestination
);
//
logger.addDestination(fileDestination);
static
QsLogging
::
DestinationPtr
consleDest
(
QsLogging
::
DestinationFactory
::
MakeDebugOutputDestination
());
//
QsLogging::DestinationPtr consleDest(QsLogging::DestinationFactory::MakeDebugOutputDestination());
logger
.
addDestination
(
consleDest
);
//
logger.addDestination(consleDest);
// QByteArray rollback;
// QByteArray rollback;
...
...
sbkpay/sbkpay.pro.user
View file @
43373054
<?xml version="1.0" encoding="UTF-8"?>
<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE QtCreatorProject>
<!DOCTYPE QtCreatorProject>
<!-- Written by QtCreator 3.5.1, 2017-09-11T1
0:00:19
. -->
<!-- Written by QtCreator 3.5.1, 2017-09-11T1
4:19:48
. -->
<qtcreator>
<qtcreator>
<data>
<data>
<variable>
EnvironmentId
</variable>
<variable>
EnvironmentId
</variable>
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment