Commit a1971a06 by 李定达

1.去除设置程序当前工作路径,改为添加程序当前的环境变量

parent 81d773dc
......@@ -68,7 +68,7 @@ void Control::Start(const char *indata, char *outdata)
QFont ft("Microsoft YaHei UI Light");
qApp->setFont(ft);
QDir::setCurrent(appPath);
//QDir::setCurrent(appPath);
QLOG_INFO() << "Openssl support:" << QSslSocket::supportsSsl();
qDebug() << "Openssl support:" << QSslSocket::supportsSsl() << QApplication::libraryPaths();
......@@ -122,6 +122,7 @@ void Control::Start(const char *indata, char *outdata)
outdata[sizeof(struct AlipayResponse)] = 0;
QLOG_INFO() << "return data to pos : " << outdata;
qDebug() << "****************** currpath *******************88" << QDir::currentPath();
}
void Control::SetResPonseWithMessage(QString code, const QString &message)
......@@ -442,7 +443,7 @@ void Control::Request(ReqType type, QStringList list)
++i;
}
if(tmpflag)
SetResPonseWithMessage("23", QString::fromLocal8Bit("支付取消成功"));
SetResPonseWithMessage("23", QString::fromLocal8Bit("支付取消成功,支付成功,金额将原路返还"));
else
{
QVariantHash hash;
......@@ -453,7 +454,7 @@ void Control::Request(ReqType type, QStringList list)
QLOG_ERROR() << "roll back faile , move request to database : " << json;
_db->insert(DB_TABLE_NAME, hash);
SetResPonseWithMessage("23", QString::fromLocal8Bit("支付取消失败"));
SetResPonseWithMessage("23", QString::fromLocal8Bit("支付取消,支付成功,金额将原路返还"));
}
_lock.lock();
......
......@@ -606,6 +606,6 @@ void HostWidget::on_btn_pay_exitint_clicked()
ui->btn_pay_exitint->hide();
ui->btn_pay_exit->hide();
_label_pay_timer->start(60);
ui->label_pay_title->setText(QString::fromLocal8Bit("交易取消中"));
ui->label_pay_title->setText(QString::fromLocal8Bit("支付取消中"));
emit Interrupt();
}
......@@ -36,7 +36,8 @@ BOOL WINAPI DllMain( HINSTANCE hInstance, DWORD dwReason, LPVOID /*lpvReserved*/
val += ";";
val += mod;
qputenv("PATH", val);
QDir::setCurrent(path);
//QDir::setCurrent(path);
qDebug() << "****************** currpath *******************88" << QDir::currentPath();
ownApplication = QMfcApp::pluginInstance( hInstance );
}
......
......@@ -15,7 +15,7 @@ include("./DataProcess/DataProcess.pri")
LIBS += -L$$PWD/lib -llibeay32 -lssleay32
CONFIG += C++11
CONFIG += C++11 SBKDLL
include($$PWD/qtwinmigrate/src/qtwinmigrate.pri)
......
<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE QtCreatorProject>
<!-- Written by QtCreator 3.5.1, 2017-09-02T12:08:46. -->
<!-- Written by QtCreator 3.5.1, 2017-09-03T16:46:48. -->
<qtcreator>
<data>
<variable>EnvironmentId</variable>
......@@ -61,7 +61,7 @@
<value type="QString" key="ProjectExplorer.ProjectConfiguration.DefaultDisplayName">Desktop Qt 5.5.1 MSVC2010 32bit</value>
<value type="QString" key="ProjectExplorer.ProjectConfiguration.DisplayName">Desktop Qt 5.5.1 MSVC2010 32bit</value>
<value type="QString" key="ProjectExplorer.ProjectConfiguration.Id">qt.55.win32_msvc2010_kit</value>
<value type="int" key="ProjectExplorer.Target.ActiveBuildConfiguration">0</value>
<value type="int" key="ProjectExplorer.Target.ActiveBuildConfiguration">1</value>
<value type="int" key="ProjectExplorer.Target.ActiveDeployConfiguration">0</value>
<value type="int" key="ProjectExplorer.Target.ActiveRunConfiguration">0</value>
<valuemap type="QVariantMap" key="ProjectExplorer.Target.BuildConfiguration.0">
......@@ -226,14 +226,12 @@
</valuelist>
<value type="int" key="PE.EnvironmentAspect.Base">2</value>
<valuelist type="QVariantList" key="PE.EnvironmentAspect.Changes"/>
<value type="QString" key="ProjectExplorer.ProjectConfiguration.DefaultDisplayName">sbkpay</value>
<value type="QString" key="ProjectExplorer.CustomExecutableRunConfiguration.Arguments"></value>
<value type="QString" key="ProjectExplorer.CustomExecutableRunConfiguration.Executable"></value>
<value type="QString" key="ProjectExplorer.CustomExecutableRunConfiguration.WorkingDirectory">%{buildDir}</value>
<value type="QString" key="ProjectExplorer.ProjectConfiguration.DefaultDisplayName">自定义执行档</value>
<value type="QString" key="ProjectExplorer.ProjectConfiguration.DisplayName"></value>
<value type="QString" key="ProjectExplorer.ProjectConfiguration.Id">Qt4ProjectManager.Qt4RunConfiguration:D:/gitcode/sbkpay/sbkpay/sbkpay.pro</value>
<value type="QString" key="Qt4ProjectManager.Qt4RunConfiguration.CommandLineArguments"></value>
<value type="QString" key="Qt4ProjectManager.Qt4RunConfiguration.ProFile">sbkpay.pro</value>
<value type="bool" key="Qt4ProjectManager.Qt4RunConfiguration.UseDyldImageSuffix">false</value>
<value type="bool" key="Qt4ProjectManager.Qt4RunConfiguration.UseTerminal">false</value>
<value type="QString" key="Qt4ProjectManager.Qt4RunConfiguration.UserWorkingDirectory"></value>
<value type="QString" key="ProjectExplorer.ProjectConfiguration.Id">ProjectExplorer.CustomExecutableRunConfiguration</value>
<value type="uint" key="RunConfiguration.QmlDebugServerPort">3768</value>
<value type="bool" key="RunConfiguration.UseCppDebugger">false</value>
<value type="bool" key="RunConfiguration.UseCppDebuggerAuto">true</value>
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment