mirror of
https://gitee.com/drabel/LibQQt.git
synced 2025-01-04 10:18:44 +08:00
v2.4 msvc utf8 control is in qqt_header.pri
This commit is contained in:
commit
61bc9a5da8
@ -19,11 +19,12 @@
|
||||
#include "qqt-qt.h"
|
||||
#include <qqt-local.h>
|
||||
|
||||
#ifdef Q_OS_WIN
|
||||
#if _MSC_VER >= 1600
|
||||
#pragma execution_character_set("utf-8")
|
||||
#endif
|
||||
#endif
|
||||
//加在qqt_header.pri里面了。
|
||||
//#ifdef Q_OS_WIN
|
||||
//#if _MSC_VER >= 1600
|
||||
//#pragma execution_character_set("utf-8")
|
||||
//#endif
|
||||
//#endif
|
||||
|
||||
#if defined(__WIN32__) || defined(__WIN64__)
|
||||
#include "qqtwin.h"
|
||||
|
@ -1,6 +1,6 @@
|
||||
#if _MSC_VER >= 1600
|
||||
#pragma execution_character_set("utf-8")
|
||||
#endif
|
||||
//#if _MSC_VER >= 1600
|
||||
//#pragma execution_character_set("utf-8")
|
||||
//#endif
|
||||
|
||||
#include "qqtcustomprogressbar.h"
|
||||
#include "qpainter.h"
|
||||
|
@ -101,11 +101,10 @@ build_pass:CONFIG(debug, debug|release) {
|
||||
#CONFIG += debug_and_release
|
||||
#CONFIG += build_all
|
||||
#if some bug occured, maybe this help me, close some warning
|
||||
!win32{
|
||||
CFLAGS = -Wno-unused-parameter -Wno-reorder -Wno-c++11-extensions -Wno-c++11-long-long -Wno-comment
|
||||
}
|
||||
QMAKE_CFLAGS += $${CFLAGS}
|
||||
QMAKE_CXXFLAGS += $${CFLAGS}
|
||||
CCFLAG =
|
||||
!win32:CCFLAGS = -Wno-unused-parameter -Wno-reorder -Wno-c++11-extensions -Wno-c++11-long-long -Wno-comment
|
||||
QMAKE_CFLAGS += $${CCFLAGS}
|
||||
QMAKE_CXXFLAGS += $${CCFLAGS}
|
||||
|
||||
#################################################################
|
||||
##build cache
|
||||
|
@ -228,7 +228,9 @@ defineTest(system_errcode) {
|
||||
#if eval configed ...
|
||||
#error: if(ret) : return (false)
|
||||
#erro : eval(ret = 0): return (false)
|
||||
#succ: equals(ret, 0):return (false)
|
||||
#succ:
|
||||
#equals(ret, 0):return (false)
|
||||
#succ:but msvc creator auto qmake....
|
||||
return ($${ret})
|
||||
}
|
||||
|
||||
|
@ -21,28 +21,41 @@ CONFIG(debug, debug|release) {
|
||||
} else {
|
||||
DEFINES -= QT_NO_DEBUG_OUTPUT
|
||||
}
|
||||
#close win32 no using fopen_s warning
|
||||
win32 {
|
||||
win32:DEFINES += _CRT_SECURE_NO_WARNINGS #fopen fopen_s
|
||||
#this three pragma cause errors
|
||||
#QMAKE_CXXFLAGS += /wd"4819" /wd"4244" /wd"4100"
|
||||
}
|
||||
|
||||
#compatible old version QQt (deperated)
|
||||
greaterThan(QT_MAJOR_VERSION, 4): DEFINES += __QT5__
|
||||
|
||||
#defined in qqtcore.h
|
||||
#lessThan(QT_MAJOR_VERSION, 5):DEFINES += nullptr=0
|
||||
|
||||
#指定/mp编译选项,编译器将使用并行编译,同时起多个编译进程并行编译不同的cpp
|
||||
#QMAKE_CXXFLAGS += /MP
|
||||
#错误:这个FLAG只能用于MSVC
|
||||
#mingw要加速编译,make -j20,-j参数是最好的解决办法。
|
||||
|
||||
#指定stable.h这个头文件作为编译预处理文件,MFC里这个文件一般叫stdafx.h 然后在 stable.h里 包含你所用到的所有 Qt 头文件
|
||||
#在.pro 文件中加入一行, 加在这里,加速编译。
|
||||
#PRECOMPILED_HEADER = $${PWD}/stable.h (qqt-qt.h)
|
||||
#错误:precompiler header只能用于MSVC
|
||||
#close win32 no using fopen_s warning
|
||||
win32:DEFINES += _CRT_SECURE_NO_WARNINGS #fopen fopen_s
|
||||
|
||||
#要加速编译,make -j20,-j参数是最好的解决办法。
|
||||
#msvc支持设置
|
||||
msvc {
|
||||
MSVC_CCFLAGS =
|
||||
#this three pragma cause mingw errors
|
||||
msvc:MSVC_CCFLAGS += /wd"4819" /wd"4244" /wd"4100"
|
||||
|
||||
#UTF8编码
|
||||
DEFINES += __MSVC_UTF8_SUPPORT__
|
||||
msvc:MSVC_CCFLAGS += -execution-charset:utf-8
|
||||
msvc:MSVC_CCFLAGS += -source-charset:utf-8
|
||||
|
||||
#指定/mp编译选项,编译器将使用并行编译,同时起多个编译进程并行编译不同的cpp
|
||||
msvc:MSVC_CCFLAGS += /MP
|
||||
#指出:这个FLAG只能用于MSVC
|
||||
|
||||
msvc:QMAKE_CFLAGS += $${MSVC_CCFLAGS}
|
||||
msvc:QMAKE_CXXFLAGS += $${MSVC_CCFLAGS}
|
||||
|
||||
#指定stable.h这个头文件作为编译预处理文件,MFC里这个文件一般叫stdafx.h 然后在 stable.h里 包含你所用到的所有 Qt 头文件
|
||||
#在.pro 文件中加入一行, 加在这里,加速编译。
|
||||
#msvc:PRECOMPILED_HEADER = $${PWD}/qqt-qt.h
|
||||
#指出:precompiler header只能用于MSVC
|
||||
}
|
||||
|
||||
#################################################################
|
||||
##build qqt or link qqt
|
||||
|
@ -54,7 +54,7 @@ defineReplace(deploy_qqt_to_mac) {
|
||||
command += $${PWD}/mac_deploy_qt4.sh $${APP_DEST_DIR}/$${TARGET}.app/Contents/MacOS/$${TARGET}
|
||||
}
|
||||
#message($$command)
|
||||
return ($$command)
|
||||
return ($${command})
|
||||
}
|
||||
|
||||
defineReplace(copy_qqt_on_mac) {
|
||||
|
Loading…
x
Reference in New Issue
Block a user