Commit fb9e8e23 by 刘帅

linux下编译运行通过

parent 868048a7
...@@ -53,7 +53,13 @@ unix { ...@@ -53,7 +53,13 @@ unix {
#Target name #Target name
VER = $$system($$PWD/../fmprc.bat $$TARGET) VER = $$system($$PWD/../fmprc.bat $$TARGET)
ORIGIN_TARGET = $$TARGET ORIGIN_TARGET = $$TARGET
TARGET = $${TARGET}_$${VER}
win32{
TARGET = $${TARGET}_$${VER}
}
else{
TARGET = $${TARGET}
}
#Header path #Header path
INCLUDEPATH += $$PWD/../include/ctk \ INCLUDEPATH += $$PWD/../include/ctk \
...@@ -67,7 +73,11 @@ LIBS += -lws2_32 -luser32 ...@@ -67,7 +73,11 @@ LIBS += -lws2_32 -luser32
CONFIG(debug, debug|release) { CONFIG(debug, debug|release) {
#Linking library #Linking library
win32 {
LIBS += -lCTKCored -lCTKPluginFrameworkd -lfmcrypt -lws2_32 -lDbgHelp LIBS += -lCTKCored -lCTKPluginFrameworkd -lfmcrypt -lws2_32 -lDbgHelp
}else{
LIBS += -lCTKCore -lCTKPluginFramework
}
#Destination path #Destination path
DESTDIR = $$PWD/../debug/plugins DESTDIR = $$PWD/../debug/plugins
} else { } else {
......
...@@ -16,7 +16,9 @@ ...@@ -16,7 +16,9 @@
#include <QSqlTableModel> #include <QSqlTableModel>
#include <QStyledItemDelegate> #include <QStyledItemDelegate>
#include <QMouseEvent> #include <QMouseEvent>
#ifdef WIN32
#include <Windows.h> #include <Windows.h>
#endif
#include <QDesktopWidget> #include <QDesktopWidget>
#include <QStandardItemModel> #include <QStandardItemModel>
#include <QPropertyAnimation> #include <QPropertyAnimation>
...@@ -251,6 +253,7 @@ void FMPPayDialog::setTableHeader() ...@@ -251,6 +253,7 @@ void FMPPayDialog::setTableHeader()
void FMPPayDialog::show() void FMPPayDialog::show()
{ {
_api_force_close=false; _api_force_close=false;
#ifdef WIN32
showNormal(); showNormal();
HWND hForeWnd = ::GetForegroundWindow(); HWND hForeWnd = ::GetForegroundWindow();
DWORD dwForeID = ::GetWindowThreadProcessId(hForeWnd,NULL); DWORD dwForeID = ::GetWindowThreadProcessId(hForeWnd,NULL);
...@@ -268,6 +271,8 @@ void FMPPayDialog::show() ...@@ -268,6 +271,8 @@ void FMPPayDialog::show()
QDesktopWidget w; QDesktopWidget w;
QRect rc = w.availableGeometry(); QRect rc = w.availableGeometry();
setGeometry((rc.width() - width()) / 2, (rc.height() - height()) / 2, width(), height()); setGeometry((rc.width() - width()) / 2, (rc.height() - height()) / 2, width(), height());
#else
#endif
return QDialog::show(); return QDialog::show();
} }
......
...@@ -15,8 +15,11 @@ signals: ...@@ -15,8 +15,11 @@ signals:
void focusIn(); void focusIn();
protected: protected:
#ifdef WIN32
void FMPFocusLineEdit::focusInEvent( QFocusEvent *e) void FMPFocusLineEdit::focusInEvent( QFocusEvent *e)
#else
void focusInEvent( QFocusEvent *e)
#endif
{ {
QLineEdit::focusInEvent(e); QLineEdit::focusInEvent(e);
emit focusIn(); emit focusIn();
......
...@@ -5,7 +5,7 @@ ...@@ -5,7 +5,7 @@
#define VER_MINOR 1 #define VER_MINOR 1
#define VER_REVISION 0 #define VER_REVISION 0
#define VER_BUILD 19 #define VER_BUILD 23
//! Convert version numbers to string //! Convert version numbers to string
#define _STR(S) #S #define _STR(S) #S
......
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