telsale-management/代码/telsale_aux_kit/source/main.cpp

68 lines
1.1 KiB
C++
Raw Normal View History

#include <QTextCodec>
#include <QString>
#include <QtWidgets/QMessageBox.h>
#include <QtWidgets/QApplication>
#include <exception>
#include "QMainFrame.h"
#include "QLoginWidget.h"
int main(int argc, char *argv[])
{
//<2F><><EFBFBD>ڱ<EFBFBD><DAB1><EFBFBD>ת<EFBFBD><D7AA>
QTextCodec * pCodecLocal = QTextCodec::codecForLocale();
QApplication a(argc, argv);
QLoginWidget login;
int iReturnCode = 0;
/*try
{
initConnectionPool();
queryParameters();
if ( checkVersion() == false )
{
QMessageBox::warning( NULL,
pCodecLocal->toUnicode( "<EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>" ),
pCodecLocal->toUnicode( "<EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>!\n<EFBFBD><EFBFBD><EFBFBD><EFBFBD>ϵ<EFBFBD><EFBFBD>Ϣ<EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>³<EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>" ));
return 0;
}
}
catch ( std::runtime_error & error )
{
releaseConnectionPool();
QMessageBox::critical( NULL,
"<EFBFBD><EFBFBD><EFBFBD><EFBFBD>",
pCodecLocal->toUnicode(error.what()) );
return iReturnCode;
}
catch ( std::exception &error )
{
releaseConnectionPool();
QMessageBox::critical( NULL,
"δ֪<EFBFBD><EFBFBD><EFBFBD><EFBFBD>",
pCodecLocal->toUnicode( error.what() ));
return iReturnCode;
}*/
login.exec();
if ( login.isLogin() == true )
{
QMainFrame w;
w.showMaximized();
iReturnCode = a.exec();
}
//releaseConnectionPool();
return iReturnCode;
}