Source

Target

Showing with 317 additions and 208 deletions
...@@ -14,6 +14,8 @@ ...@@ -14,6 +14,8 @@
<string>@TYPEINFO@</string> <string>@TYPEINFO@</string>
<key>CFBundleExecutable</key> <key>CFBundleExecutable</key>
<string>@LIBRARY@</string> <string>@LIBRARY@</string>
<key>CFBundleIdentifier</key>
<string>@BUNDLEIDENTIFIER@</string>
<key>NOTE</key> <key>NOTE</key>
<string>Please, do NOT change this file -- It was generated by Qt/QMake.</string> <string>Please, do NOT change this file -- It was generated by Qt/QMake.</string>
</dict> </dict>
......
...@@ -14,6 +14,8 @@ ...@@ -14,6 +14,8 @@
<string>@TYPEINFO@</string> <string>@TYPEINFO@</string>
<key>CFBundleExecutable</key> <key>CFBundleExecutable</key>
<string>@LIBRARY@</string> <string>@LIBRARY@</string>
<key>CFBundleIdentifier</key>
<string>@BUNDLEIDENTIFIER@</string>
<key>NOTE</key> <key>NOTE</key>
<string>Please, do NOT change this file -- It was generated by Qt/QMake.</string> <string>Please, do NOT change this file -- It was generated by Qt/QMake.</string>
</dict> </dict>
......
...@@ -24,6 +24,8 @@ ...@@ -24,6 +24,8 @@
<string>1.0</string> <string>1.0</string>
<key>LSRequiresIPhoneOS</key> <key>LSRequiresIPhoneOS</key>
<true/> <true/>
<key>UILaunchStoryboardName</key>
<string>LaunchScreen</string>
<key>UISupportedInterfaceOrientations</key> <key>UISupportedInterfaceOrientations</key>
<array> <array>
<string>UIInterfaceOrientationPortrait</string> <string>UIInterfaceOrientationPortrait</string>
......
<?xml version=\"1.0\" encoding=\"UTF-8\" standalone=\"no\"?>
<document type=\"com.apple.InterfaceBuilder3.CocoaTouch.XIB\" version=\"3.0\" toolsVersion=\"6250\" systemVersion=\"14A343f\" targetRuntime=\"iOS.CocoaTouch\" propertyAccessControl=\"none\" useAutolayout=\"YES\" launchScreen=\"YES\" useTraitCollections=\"YES\">
<dependencies>
<plugIn identifier=\"com.apple.InterfaceBuilder.IBCocoaTouchPlugin\" version=\"6244\"/>
<capability name=\"Constraints with non-1.0 multipliers\" minToolsVersion=\"5.1\"/>
</dependencies>
<objects>
<placeholder placeholderIdentifier=\"IBFilesOwner\" id=\"-1\" userLabel=\"File\'s Owner\"/>
<placeholder placeholderIdentifier=\"IBFirstResponder\" id=\"-2\" customClass=\"UIResponder\"/>
<view contentMode=\"scaleToFill\" id=\"iN0-l3-epB\">
<rect key=\"frame\" x=\"0.0\" y=\"0.0\" width=\"480\" height=\"480\"/>
<autoresizingMask key=\"autoresizingMask\" widthSizable=\"YES\" heightSizable=\"YES\"/>
<subviews>
<label opaque=\"NO\" clipsSubviews=\"YES\" userInteractionEnabled=\"NO\" contentMode=\"left\" horizontalHuggingPriority=\"251\" verticalHuggingPriority=\"251\" misplaced=\"YES\" text=\"\" textAlignment=\"center\" lineBreakMode=\"tailTruncation\" baselineAdjustment=\"alignBaselines\" minimumFontSize=\"9\" translatesAutoresizingMaskIntoConstraints=\"NO\" id=\"8ie-xW-0ye\">
<rect key=\"frame\" x=\"20\" y=\"439\" width=\"441\" height=\"21\"/>
<fontDescription key=\"fontDescription\" type=\"system\" pointSize=\"17\"/>
<color key=\"textColor\" cocoaTouchSystemColor=\"darkTextColor\"/>
<nil key=\"highlightedColor\"/>
<variation key=\"widthClass=compact\">
<fontDescription key=\"fontDescription\" type=\"system\" pointSize=\"11\"/>
</variation>
</label>
<label opaque=\"NO\" clipsSubviews=\"YES\" userInteractionEnabled=\"NO\" contentMode=\"left\" horizontalHuggingPriority=\"251\" verticalHuggingPriority=\"251\" text=\"$$TARGET\"
textAlignment=\"center\" lineBreakMode=\"middleTruncation\" baselineAdjustment=\"alignBaselines\" minimumFontSize=\"18\" translatesAutoresizingMaskIntoConstraints=\"NO\" id=\"kId-c2-rCX\">
<rect key=\"frame\" x=\"20\" y=\"140\" width=\"441\" height=\"43\"/>
<fontDescription key=\"fontDescription\" type=\"boldSystem\" pointSize=\"36\"/>
<color key=\"textColor\" cocoaTouchSystemColor=\"darkTextColor\"/>
<nil key=\"highlightedColor\"/>
</label>
</subviews>
<color key=\"backgroundColor\" white=\"1\" alpha=\"1\" colorSpace=\"custom\" customColorSpace=\"calibratedWhite\"/>
<constraints>
<constraint firstItem=\"kId-c2-rCX\" firstAttribute=\"centerY\" secondItem=\"iN0-l3-epB\" secondAttribute=\"bottom\" multiplier=\"1/3\" constant=\"1\" id=\"Kid-kn-2rF\"/>
<constraint firstAttribute=\"centerX\" secondItem=\"kId-c2-rCX\" secondAttribute=\"centerX\" id=\"Koa-jz-hwk\"/>
<constraint firstAttribute=\"bottom\" secondItem=\"8ie-xW-0ye\" secondAttribute=\"bottom\" constant=\"20\" id=\"Kzo-t9-V3l\"/>
<constraint firstItem=\"8ie-xW-0ye\" firstAttribute=\"leading\" secondItem=\"iN0-l3-epB\" secondAttribute=\"leading\" constant=\"20\" symbolic=\"YES\" id=\"MfP-vx-nX0\"/>
<constraint firstAttribute=\"centerX\" secondItem=\"8ie-xW-0ye\" secondAttribute=\"centerX\" id=\"ZEH-qu-HZ9\"/>
<constraint firstItem=\"kId-c2-rCX\" firstAttribute=\"leading\" secondItem=\"iN0-l3-epB\" secondAttribute=\"leading\" constant=\"20\" symbolic=\"YES\" id=\"fvb-Df-36g\"/>
</constraints>
<nil key=\"simulatedStatusBarMetrics\"/>
<freeformSimulatedSizeMetrics key=\"simulatedDestinationMetrics\"/>
<point key=\"canvasLocation\" x=\"404\" y=\"445\"/>
</view>
</objects>
</document>
...@@ -184,6 +184,14 @@ macx-xcode { ...@@ -184,6 +184,14 @@ macx-xcode {
QMAKE_SUBSTITUTES += copy_image QMAKE_SUBSTITUTES += copy_image
launch_images.files = $$copy_image.output launch_images.files = $$copy_image.output
QMAKE_BUNDLE_DATA += launch_images QMAKE_BUNDLE_DATA += launch_images
# Set up default LaunchScreen to support iPhone6/6+
launch_screen = LaunchScreen.xib
copy_launch_screen.input = $$QMAKESPEC/$$launch_screen
copy_launch_screen.output = $$OUT_PWD/$${TARGET}.xcodeproj/$$launch_screen
QMAKE_SUBSTITUTES += copy_launch_screen
launch_screens.files = $$copy_launch_screen.output
QMAKE_BUNDLE_DATA += launch_screens
} }
macx-xcode { macx-xcode {
......
...@@ -14,6 +14,8 @@ ...@@ -14,6 +14,8 @@
<string>@TYPEINFO@</string> <string>@TYPEINFO@</string>
<key>CFBundleExecutable</key> <key>CFBundleExecutable</key>
<string>@LIBRARY@</string> <string>@LIBRARY@</string>
<key>CFBundleIdentifier</key>
<string>@BUNDLEIDENTIFIER@</string>
<key>NOTE</key> <key>NOTE</key>
<string>Please, do NOT change this file -- It was generated by Qt/QMake.</string> <string>Please, do NOT change this file -- It was generated by Qt/QMake.</string>
</dict> </dict>
......
...@@ -13,6 +13,7 @@ QMAKE_CXXFLAGS_THREAD = $$QMAKE_CFLAGS_THREAD ...@@ -13,6 +13,7 @@ QMAKE_CXXFLAGS_THREAD = $$QMAKE_CFLAGS_THREAD
QMAKE_INCDIR = /usr/local/include QMAKE_INCDIR = /usr/local/include
QMAKE_LIBDIR = /usr/local/lib QMAKE_LIBDIR = /usr/local/lib
QMAKE_LFLAGS_NOUNDEF = -Wl,--no-undefined
QMAKE_LFLAGS_THREAD = -pthread QMAKE_LFLAGS_THREAD = -pthread
QMAKE_LIBS = QMAKE_LIBS =
...@@ -28,6 +29,5 @@ QMAKE_RANLIB = ...@@ -28,6 +29,5 @@ QMAKE_RANLIB =
include(../../common/unix.conf) include(../../common/unix.conf)
include(../../common/gcc-base-unix.conf) include(../../common/gcc-base-unix.conf)
include(../../common/g++-unix.conf)
include(../../common/clang.conf) include(../../common/clang.conf)
load(qt_config) load(qt_config)
...@@ -1029,6 +1029,21 @@ ProjectBuilderMakefileGenerator::writeMakeParts(QTextStream &t) ...@@ -1029,6 +1029,21 @@ ProjectBuilderMakefileGenerator::writeMakeParts(QTextStream &t)
if (!project->isEmpty("QMAKE_PRE_LINK")) { if (!project->isEmpty("QMAKE_PRE_LINK")) {
QString phase_key = keyFor("QMAKE_PBX_PRELINK_BUILDPHASE"); QString phase_key = keyFor("QMAKE_PBX_PRELINK_BUILDPHASE");
project->values("QMAKE_PBX_BUILDPHASES").append(phase_key); project->values("QMAKE_PBX_BUILDPHASES").append(phase_key);
ProStringList inputPaths;
ProStringList outputPaths;
const ProStringList &archs = project->values("QMAKE_XCODE_ARCHS");
if (!archs.isEmpty()) {
for (int i = 0; i < archs.size(); ++i) {
const ProString &arch = archs.at(i);
inputPaths << "$(OBJECT_FILE_DIR_$(CURRENT_VARIANT))/" + arch + "/";
outputPaths << "$(LINK_FILE_LIST_$(CURRENT_VARIANT)_" + arch + ")";
}
} else {
inputPaths << "$(OBJECT_FILE_DIR_$(CURRENT_VARIANT))/$(CURRENT_ARCH)/";
outputPaths << "$(LINK_FILE_LIST_$(CURRENT_VARIANT)_$(CURRENT_ARCH))";
}
t << "\t\t" << phase_key << " = {\n" t << "\t\t" << phase_key << " = {\n"
<< "\t\t\t" << writeSettings("buildActionMask", "2147483647", SettingsNoQuote) << ";\n" << "\t\t\t" << writeSettings("buildActionMask", "2147483647", SettingsNoQuote) << ";\n"
<< "\t\t\t" << writeSettings("files", ProStringList(), SettingsAsList, 4) << ";\n" << "\t\t\t" << writeSettings("files", ProStringList(), SettingsAsList, 4) << ";\n"
...@@ -1036,8 +1051,8 @@ ProjectBuilderMakefileGenerator::writeMakeParts(QTextStream &t) ...@@ -1036,8 +1051,8 @@ ProjectBuilderMakefileGenerator::writeMakeParts(QTextStream &t)
// resolved dependenices, so we have to ensure that this phase is run after the // resolved dependenices, so we have to ensure that this phase is run after the
// compilation phase, and before the link phase. Making the phase depend on the // compilation phase, and before the link phase. Making the phase depend on the
// object file directory, and "write" to the list of files to link achieves that. // object file directory, and "write" to the list of files to link achieves that.
<< "\t\t\t" << writeSettings("inputPaths", ProStringList("$(OBJECT_FILE_DIR_$(CURRENT_VARIANT))/$(CURRENT_ARCH)/"), SettingsAsList, 4) << ";\n" << "\t\t\t" << writeSettings("inputPaths", inputPaths, SettingsAsList, 4) << ";\n"
<< "\t\t\t" << writeSettings("outputPaths", ProStringList("$(LINK_FILE_LIST_$(CURRENT_VARIANT)_$(CURRENT_ARCH))"), SettingsAsList, 4) << ";\n" << "\t\t\t" << writeSettings("outputPaths", outputPaths, SettingsAsList, 4) << ";\n"
<< "\t\t\t" << writeSettings("isa", "PBXShellScriptBuildPhase", SettingsNoQuote) << ";\n" << "\t\t\t" << writeSettings("isa", "PBXShellScriptBuildPhase", SettingsNoQuote) << ";\n"
<< "\t\t\t" << writeSettings("runOnlyForDeploymentPostprocessing", "0", SettingsNoQuote) << ";\n" << "\t\t\t" << writeSettings("runOnlyForDeploymentPostprocessing", "0", SettingsNoQuote) << ";\n"
<< "\t\t\t" << writeSettings("name", "Qt Prelink") << ";\n" << "\t\t\t" << writeSettings("name", "Qt Prelink") << ";\n"
......
...@@ -814,22 +814,26 @@ UnixMakefileGenerator::writeMakeParts(QTextStream &t) ...@@ -814,22 +814,26 @@ UnixMakefileGenerator::writeMakeParts(QTextStream &t)
} }
commonSedArgs << "-e \"s,@TYPEINFO@,"<< (project->isEmpty("QMAKE_PKGINFO_TYPEINFO") ? commonSedArgs << "-e \"s,@TYPEINFO@,"<< (project->isEmpty("QMAKE_PKGINFO_TYPEINFO") ?
QString::fromLatin1("????") : project->first("QMAKE_PKGINFO_TYPEINFO").left(4)) << ",g\" "; QString::fromLatin1("????") : project->first("QMAKE_PKGINFO_TYPEINFO").left(4)) << ",g\" ";
QString bundlePrefix = project->first("QMAKE_TARGET_BUNDLE_PREFIX").toQString();
if (bundlePrefix.isEmpty())
bundlePrefix = "com.yourcompany";
if (bundlePrefix.endsWith("."))
bundlePrefix.chop(1);
QString bundleIdentifier = bundlePrefix + "." + var("QMAKE_BUNDLE");
if (bundleIdentifier.endsWith(".app"))
bundleIdentifier.chop(4);
if (bundleIdentifier.endsWith(".framework"))
bundleIdentifier.chop(10);
commonSedArgs << "-e \"s,@BUNDLEIDENTIFIER@," << bundleIdentifier << ",g\" ";
if (isApp) { if (isApp) {
QString icon = fileFixify(var("ICON")); QString icon = fileFixify(var("ICON"));
QString bundlePrefix = project->first("QMAKE_TARGET_BUNDLE_PREFIX").toQString();
if (bundlePrefix.isEmpty())
bundlePrefix = "com.yourcompany";
if (bundlePrefix.endsWith("."))
bundlePrefix.chop(1);
QString bundleIdentifier = bundlePrefix + "." + var("QMAKE_BUNDLE");
if (bundleIdentifier.endsWith(".app"))
bundleIdentifier.chop(4);
t << "@$(DEL_FILE) " << info_plist_out << "\n\t" t << "@$(DEL_FILE) " << info_plist_out << "\n\t"
<< "@sed "; << "@sed ";
foreach (const ProString &arg, commonSedArgs) foreach (const ProString &arg, commonSedArgs)
t << arg; t << arg;
t << "-e \"s,@ICON@," << icon.section(Option::dir_sep, -1) << ",g\" " t << "-e \"s,@ICON@," << icon.section(Option::dir_sep, -1) << ",g\" "
<< "-e \"s,@BUNDLEIDENTIFIER@," << bundleIdentifier << ",g\" "
<< "-e \"s,@EXECUTABLE@," << var("QMAKE_ORIG_TARGET") << ",g\" " << "-e \"s,@EXECUTABLE@," << var("QMAKE_ORIG_TARGET") << ",g\" "
<< "-e \"s,@TYPEINFO@,"<< (project->isEmpty("QMAKE_PKGINFO_TYPEINFO") ? << "-e \"s,@TYPEINFO@,"<< (project->isEmpty("QMAKE_PKGINFO_TYPEINFO") ?
QString::fromLatin1("????") : project->first("QMAKE_PKGINFO_TYPEINFO").left(4)) << ",g\" " QString::fromLatin1("????") : project->first("QMAKE_PKGINFO_TYPEINFO").left(4)) << ",g\" "
......
...@@ -67,6 +67,7 @@ import android.graphics.NinePatch; ...@@ -67,6 +67,7 @@ import android.graphics.NinePatch;
import android.graphics.Paint; import android.graphics.Paint;
import android.graphics.Rect; import android.graphics.Rect;
import android.graphics.RectF; import android.graphics.RectF;
import android.graphics.PorterDuff;
import android.graphics.drawable.AnimationDrawable; import android.graphics.drawable.AnimationDrawable;
import android.graphics.drawable.BitmapDrawable; import android.graphics.drawable.BitmapDrawable;
import android.graphics.drawable.ClipDrawable; import android.graphics.drawable.ClipDrawable;
...@@ -820,8 +821,27 @@ public class ExtractStyle { ...@@ -820,8 +821,27 @@ public class ExtractStyle {
bmp = (Bitmap) drawable; bmp = (Bitmap) drawable;
else else
{ {
if (drawable instanceof BitmapDrawable) if (drawable instanceof BitmapDrawable) {
bmp = ((BitmapDrawable)drawable).getBitmap(); BitmapDrawable bitmapDrawable = (BitmapDrawable)drawable;
bmp = bitmapDrawable.getBitmap();
try {
json.put("gravity", bitmapDrawable.getGravity());
json.put("tileModeX", bitmapDrawable.getTileModeX());
json.put("tileModeY", bitmapDrawable.getTileModeY());
if (Build.VERSION.SDK_INT >= 18) {
json.put("antialias", (Boolean) BitmapDrawable.class.getMethod("hasAntiAlias").invoke(bitmapDrawable));
json.put("mipMap", (Boolean) BitmapDrawable.class.getMethod("hasMipMap").invoke(bitmapDrawable));
}
if (Build.VERSION.SDK_INT >= 21) {
json.put("tintMode", (PorterDuff.Mode) BitmapDrawable.class.getMethod("getTintMode").invoke(bitmapDrawable));
ColorStateList tintList = (ColorStateList) BitmapDrawable.class.getMethod("getTint").invoke(bitmapDrawable);
if (tintList != null)
json.put("tintList", getColorStateList(tintList));
}
} catch (Exception e) {
e.printStackTrace();
}
}
else else
{ {
if (drawable instanceof ScaleDrawable) if (drawable instanceof ScaleDrawable)
...@@ -1544,6 +1564,11 @@ public class ExtractStyle { ...@@ -1544,6 +1564,11 @@ public class ExtractStyle {
json.put("Switch_switchPadding", a.getDimensionPixelSize(getField(styleableClass, "Switch_switchPadding"), 0)); json.put("Switch_switchPadding", a.getDimensionPixelSize(getField(styleableClass, "Switch_switchPadding"), 0));
json.put("Switch_thumbTextPadding", a.getDimensionPixelSize(getField(styleableClass, "Switch_thumbTextPadding"), 0)); json.put("Switch_thumbTextPadding", a.getDimensionPixelSize(getField(styleableClass, "Switch_thumbTextPadding"), 0));
if (Build.VERSION.SDK_INT >= 21) {
json.put("Switch_showText", a.getBoolean(getField(styleableClass, "Switch_showText"), true));
json.put("Switch_splitTrack", a.getBoolean(getField(styleableClass, "Switch_splitTrack"), false));
}
a.recycle(); a.recycle();
jsonWriter.name(styleName).value(json); jsonWriter.name(styleName).value(json);
} catch (Exception e) { } catch (Exception e) {
......
...@@ -760,14 +760,6 @@ void Widget::splitCaseSensitiveFunction() ...@@ -760,14 +760,6 @@ void Widget::splitCaseSensitiveFunction()
void Widget::sprintfFunction() void Widget::sprintfFunction()
{ {
//! [63]
size_t BufSize;
char buf[BufSize];
::snprintf(buf, BufSize, "%lld", 123456789LL);
QString str = QString::fromUtf8(buf);
//! [63]
//! [64] //! [64]
QString result; QString result;
QTextStream(&result) << "pi = " << 3.14; QTextStream(&result) << "pi = " << 3.14;
......
...@@ -78,7 +78,7 @@ ...@@ -78,7 +78,7 @@
# define Q_NO_USING_KEYWORD # define Q_NO_USING_KEYWORD
#elif defined(_MSC_VER) #elif defined(_MSC_VER)
# define Q_CC_MSVC # define Q_CC_MSVC (_MSC_VER)
# define Q_CC_MSVC_NET # define Q_CC_MSVC_NET
# define Q_OUTOFLINE_TEMPLATE inline # define Q_OUTOFLINE_TEMPLATE inline
# if _MSC_VER < 1600 # if _MSC_VER < 1600
...@@ -137,14 +137,14 @@ ...@@ -137,14 +137,14 @@
# endif # endif
#elif defined(__GNUC__) #elif defined(__GNUC__)
# define Q_CC_GNU # define Q_CC_GNU (__GNUC__ * 100 + __GNUC_MINOR__)
# define Q_C_CALLBACKS # define Q_C_CALLBACKS
# if defined(__MINGW32__) # if defined(__MINGW32__)
# define Q_CC_MINGW # define Q_CC_MINGW
# endif # endif
# if defined(__INTEL_COMPILER) # if defined(__INTEL_COMPILER)
/* Intel C++ also masquerades as GCC */ /* Intel C++ also masquerades as GCC */
# define Q_CC_INTEL # define Q_CC_INTEL (__INTEL_COMPILER)
# define Q_ASSUME_IMPL(expr) __assume(expr) # define Q_ASSUME_IMPL(expr) __assume(expr)
# define Q_UNREACHABLE_IMPL() __builtin_unreachable() # define Q_UNREACHABLE_IMPL() __builtin_unreachable()
# if __INTEL_COMPILER >= 1300 && !defined(__APPLE__) # if __INTEL_COMPILER >= 1300 && !defined(__APPLE__)
...@@ -152,7 +152,26 @@ ...@@ -152,7 +152,26 @@
# endif # endif
# elif defined(__clang__) # elif defined(__clang__)
/* Clang also masquerades as GCC */ /* Clang also masquerades as GCC */
# define Q_CC_CLANG # if defined(__apple_build_version__)
# /* http://en.wikipedia.org/wiki/Xcode#Toolchain_Versions */
# if __apple_build_version__ >= 600051
# define Q_CC_CLANG 305
# elif __apple_build_version__ >= 503038
# define Q_CC_CLANG 304
# elif __apple_build_version__ >= 500275
# define Q_CC_CLANG 303
# elif __apple_build_version__ >= 425024
# define Q_CC_CLANG 302
# elif __apple_build_version__ >= 318045
# define Q_CC_CLANG 301
# elif __apple_build_version__ >= 211101
# define Q_CC_CLANG 300
# else
# error "Unknown Apple Clang version"
# endif
# else
# define Q_CC_CLANG ((__clang_major__ * 100) + __clang_minor__)
# endif
# define Q_ASSUME_IMPL(expr) if (expr){} else __builtin_unreachable() # define Q_ASSUME_IMPL(expr) if (expr){} else __builtin_unreachable()
# define Q_UNREACHABLE_IMPL() __builtin_unreachable() # define Q_UNREACHABLE_IMPL() __builtin_unreachable()
# if !defined(__has_extension) # if !defined(__has_extension)
...@@ -168,7 +187,7 @@ ...@@ -168,7 +187,7 @@
# endif # endif
# else # else
/* Plain GCC */ /* Plain GCC */
# if (__GNUC__ * 100 + __GNUC_MINOR__) >= 405 # if Q_CC_GNU >= 405
# define Q_ASSUME_IMPL(expr) if (expr){} else __builtin_unreachable() # define Q_ASSUME_IMPL(expr) if (expr){} else __builtin_unreachable()
# define Q_UNREACHABLE_IMPL() __builtin_unreachable() # define Q_UNREACHABLE_IMPL() __builtin_unreachable()
# define Q_DECL_DEPRECATED_X(text) __attribute__ ((__deprecated__(text))) # define Q_DECL_DEPRECATED_X(text) __attribute__ ((__deprecated__(text)))
...@@ -202,7 +221,7 @@ ...@@ -202,7 +221,7 @@
# define QT_NO_ARM_EABI # define QT_NO_ARM_EABI
# endif # endif
# endif # endif
# if (__GNUC__ * 100 + __GNUC_MINOR__) >= 403 && !defined(Q_CC_CLANG) # if Q_CC_GNU >= 403 && !defined(Q_CC_CLANG)
# define Q_ALLOC_SIZE(x) __attribute__((alloc_size(x))) # define Q_ALLOC_SIZE(x) __attribute__((alloc_size(x)))
# endif # endif
...@@ -308,7 +327,7 @@ ...@@ -308,7 +327,7 @@
/* Using the `using' keyword avoids Intel C++ for Linux warnings */ /* Using the `using' keyword avoids Intel C++ for Linux warnings */
# elif defined(__INTEL_COMPILER) # elif defined(__INTEL_COMPILER)
# define Q_CC_INTEL # define Q_CC_INTEL (__INTEL_COMPILER)
/* Uses CFront, make sure to read the manual how to tweak templates. */ /* Uses CFront, make sure to read the manual how to tweak templates. */
# elif defined(__ghs) # elif defined(__ghs)
...@@ -566,7 +585,7 @@ ...@@ -566,7 +585,7 @@
# endif # endif
// Variadic macros are supported for gnu++98, c++11, c99 ... since 2.9 // Variadic macros are supported for gnu++98, c++11, c99 ... since 2.9
# if ((__clang_major__ * 100) + __clang_minor__) >= 209 # if Q_CC_CLANG >= 209
# if !defined(__STRICT_ANSI__) || defined(__GXX_EXPERIMENTAL_CXX0X__) \ # if !defined(__STRICT_ANSI__) || defined(__GXX_EXPERIMENTAL_CXX0X__) \
|| (defined(__cplusplus) && (__cplusplus >= 201103L)) \ || (defined(__cplusplus) && (__cplusplus >= 201103L)) \
|| (defined(__STDC_VERSION__) && (__STDC_VERSION__ >= 199901L)) || (defined(__STDC_VERSION__) && (__STDC_VERSION__ >= 199901L))
...@@ -668,7 +687,7 @@ ...@@ -668,7 +687,7 @@
# define Q_COMPILER_VARIADIC_TEMPLATES # define Q_COMPILER_VARIADIC_TEMPLATES
# endif # endif
/* Features that have no __has_feature() check */ /* Features that have no __has_feature() check */
# if ((__clang_major__ * 100) + __clang_minor__) >= 209 /* since clang 2.9 */ # if Q_CC_CLANG >= 209 /* since clang 2.9 */
# define Q_COMPILER_EXTERN_TEMPLATES # define Q_COMPILER_EXTERN_TEMPLATES
# endif # endif
# endif # endif
...@@ -709,7 +728,7 @@ ...@@ -709,7 +728,7 @@
#if defined(Q_CC_GNU) && !defined(Q_CC_INTEL) && !defined(Q_CC_CLANG) #if defined(Q_CC_GNU) && !defined(Q_CC_INTEL) && !defined(Q_CC_CLANG)
# define Q_COMPILER_RESTRICTED_VLA # define Q_COMPILER_RESTRICTED_VLA
# define Q_COMPILER_THREADSAFE_STATICS # define Q_COMPILER_THREADSAFE_STATICS
# if (__GNUC__ * 100 + __GNUC_MINOR__) >= 403 # if Q_CC_GNU >= 403
// GCC supports binary literals in C, C++98 and C++11 modes // GCC supports binary literals in C, C++98 and C++11 modes
# define Q_COMPILER_BINARY_LITERALS # define Q_COMPILER_BINARY_LITERALS
# endif # endif
...@@ -720,13 +739,13 @@ ...@@ -720,13 +739,13 @@
# define Q_COMPILER_VARIADIC_MACROS # define Q_COMPILER_VARIADIC_MACROS
# endif # endif
# if defined(__GXX_EXPERIMENTAL_CXX0X__) || __cplusplus >= 201103L # if defined(__GXX_EXPERIMENTAL_CXX0X__) || __cplusplus >= 201103L
# if (__GNUC__ * 100 + __GNUC_MINOR__) >= 403 # if Q_CC_GNU >= 403
/* C++11 features supported in GCC 4.3: */ /* C++11 features supported in GCC 4.3: */
# define Q_COMPILER_DECLTYPE # define Q_COMPILER_DECLTYPE
# define Q_COMPILER_RVALUE_REFS # define Q_COMPILER_RVALUE_REFS
# define Q_COMPILER_STATIC_ASSERT # define Q_COMPILER_STATIC_ASSERT
# endif # endif
# if (__GNUC__ * 100 + __GNUC_MINOR__) >= 404 # if Q_CC_GNU >= 404
/* C++11 features supported in GCC 4.4: */ /* C++11 features supported in GCC 4.4: */
# define Q_COMPILER_AUTO_FUNCTION # define Q_COMPILER_AUTO_FUNCTION
# define Q_COMPILER_AUTO_TYPE # define Q_COMPILER_AUTO_TYPE
...@@ -735,7 +754,7 @@ ...@@ -735,7 +754,7 @@
# define Q_COMPILER_UNICODE_STRINGS # define Q_COMPILER_UNICODE_STRINGS
# define Q_COMPILER_VARIADIC_TEMPLATES # define Q_COMPILER_VARIADIC_TEMPLATES
# endif # endif
# if (__GNUC__ * 100 + __GNUC_MINOR__) >= 405 # if Q_CC_GNU >= 405
/* C++11 features supported in GCC 4.5: */ /* C++11 features supported in GCC 4.5: */
# define Q_COMPILER_EXPLICIT_CONVERSIONS # define Q_COMPILER_EXPLICIT_CONVERSIONS
/* GCC 4.4 implements initializer_list but does not define typedefs required /* GCC 4.4 implements initializer_list but does not define typedefs required
...@@ -745,7 +764,7 @@ ...@@ -745,7 +764,7 @@
# define Q_COMPILER_RAW_STRINGS # define Q_COMPILER_RAW_STRINGS
# define Q_COMPILER_CLASS_ENUM # define Q_COMPILER_CLASS_ENUM
# endif # endif
# if (__GNUC__ * 100 + __GNUC_MINOR__) >= 406 # if Q_CC_GNU >= 406
/* Pre-4.6 compilers implement a non-final snapshot of N2346, hence default and delete /* Pre-4.6 compilers implement a non-final snapshot of N2346, hence default and delete
* functions are supported only if they are public. Starting from 4.6, GCC handles * functions are supported only if they are public. Starting from 4.6, GCC handles
* final version - the access modifier is not relevant. */ * final version - the access modifier is not relevant. */
...@@ -757,7 +776,7 @@ ...@@ -757,7 +776,7 @@
# define Q_COMPILER_UNRESTRICTED_UNIONS # define Q_COMPILER_UNRESTRICTED_UNIONS
# define Q_COMPILER_RANGE_FOR # define Q_COMPILER_RANGE_FOR
# endif # endif
# if (__GNUC__ * 100 + __GNUC_MINOR__) >= 407 # if Q_CC_GNU >= 407
/* GCC 4.4 implemented <atomic> and std::atomic using its old intrinsics. /* GCC 4.4 implemented <atomic> and std::atomic using its old intrinsics.
* However, the implementation is incomplete for most platforms until GCC 4.7: * However, the implementation is incomplete for most platforms until GCC 4.7:
* instead, std::atomic would use an external lock. Since we need an std::atomic * instead, std::atomic would use an external lock. Since we need an std::atomic
...@@ -773,20 +792,20 @@ ...@@ -773,20 +792,20 @@
# define Q_COMPILER_TEMPLATE_ALIAS # define Q_COMPILER_TEMPLATE_ALIAS
# define Q_COMPILER_UDL # define Q_COMPILER_UDL
# endif # endif
# if (__GNUC__ * 100 + __GNUC_MINOR__) >= 408 # if Q_CC_GNU >= 408
# define Q_COMPILER_ATTRIBUTES # define Q_COMPILER_ATTRIBUTES
# define Q_COMPILER_ALIGNAS # define Q_COMPILER_ALIGNAS
# define Q_COMPILER_ALIGNOF # define Q_COMPILER_ALIGNOF
# define Q_COMPILER_INHERITING_CONSTRUCTORS # define Q_COMPILER_INHERITING_CONSTRUCTORS
# define Q_COMPILER_THREAD_LOCAL # define Q_COMPILER_THREAD_LOCAL
# if (__GNUC__ * 100 + __GNUC_MINOR__) > 408 || __GNUC_PATCHLEVEL__ >= 1 # if Q_CC_GNU > 408 || __GNUC_PATCHLEVEL__ >= 1
# define Q_COMPILER_REF_QUALIFIERS # define Q_COMPILER_REF_QUALIFIERS
# endif # endif
# endif # endif
/* C++11 features are complete as of GCC 4.8.1 */ /* C++11 features are complete as of GCC 4.8.1 */
# endif # endif
# if __cplusplus > 201103L # if __cplusplus > 201103L
# if (__GNUC__ * 100 + __GNUC_MINOR__) >= 409 # if Q_CC_GNU >= 409
/* C++1y features in GCC 4.9 - deprecated, do not update this list */ /* C++1y features in GCC 4.9 - deprecated, do not update this list */
//# define Q_COMPILER_BINARY_LITERALS // already supported since GCC 4.3 as an extension //# define Q_COMPILER_BINARY_LITERALS // already supported since GCC 4.3 as an extension
# define Q_COMPILER_LAMBDA_CAPTURES # define Q_COMPILER_LAMBDA_CAPTURES
......
...@@ -877,7 +877,7 @@ public: ...@@ -877,7 +877,7 @@ public:
// (http://www.open-std.org/jtc1/sc22/wg21/docs/cwg_defects.html#382). // (http://www.open-std.org/jtc1/sc22/wg21/docs/cwg_defects.html#382).
// GCC 4.3 and 4.4 have support for decltype, but are affected by DR 382. // GCC 4.3 and 4.4 have support for decltype, but are affected by DR 382.
# if defined(Q_COMPILER_DECLTYPE) && \ # if defined(Q_COMPILER_DECLTYPE) && \
(defined(Q_CC_CLANG) || defined(Q_CC_INTEL) || !defined(Q_CC_GNU) || (__GNUC__ * 100 + __GNUC_MINOR__) >= 405) (defined(Q_CC_CLANG) || defined(Q_CC_INTEL) || !defined(Q_CC_GNU) || Q_CC_GNU >= 405)
# define QT_FOREACH_DECLTYPE(x) typename QtPrivate::remove_reference<decltype(x)>::type # define QT_FOREACH_DECLTYPE(x) typename QtPrivate::remove_reference<decltype(x)>::type
# else # else
# define QT_FOREACH_DECLTYPE(x) __typeof__((x)) # define QT_FOREACH_DECLTYPE(x) __typeof__((x))
......
...@@ -84,14 +84,7 @@ class QLibraryInfoPrivate ...@@ -84,14 +84,7 @@ class QLibraryInfoPrivate
{ {
public: public:
static QSettings *findConfiguration(); static QSettings *findConfiguration();
#ifndef QT_BOOTSTRAPPED #ifdef QT_BOOTSTRAPPED
static void cleanup()
{
QLibrarySettings *ls = qt_library_settings();
if (ls)
ls->settings.reset(0);
}
#else
static bool haveGroup(QLibraryInfo::PathGroup group) static bool haveGroup(QLibraryInfo::PathGroup group)
{ {
QLibrarySettings *ls = qt_library_settings(); QLibrarySettings *ls = qt_library_settings();
...@@ -114,7 +107,6 @@ QLibrarySettings::QLibrarySettings() ...@@ -114,7 +107,6 @@ QLibrarySettings::QLibrarySettings()
: settings(QLibraryInfoPrivate::findConfiguration()) : settings(QLibraryInfoPrivate::findConfiguration())
{ {
#ifndef QT_BOOTSTRAPPED #ifndef QT_BOOTSTRAPPED
qAddPostRoutine(QLibraryInfoPrivate::cleanup);
bool haveEffectivePaths; bool haveEffectivePaths;
bool havePaths; bool havePaths;
#endif #endif
......
...@@ -87,9 +87,9 @@ ...@@ -87,9 +87,9 @@
ARM is bi-endian, detect using __ARMEL__ or __ARMEB__, falling back to ARM is bi-endian, detect using __ARMEL__ or __ARMEB__, falling back to
auto-detection implemented below. auto-detection implemented below.
*/ */
#if defined(__arm__) || defined(__TARGET_ARCH_ARM) || defined(_M_ARM) || defined(__arm64__) #if defined(__arm__) || defined(__TARGET_ARCH_ARM) || defined(_M_ARM) || defined(__aarch64__)
# define Q_PROCESSOR_ARM # define Q_PROCESSOR_ARM
# if defined(__arm64__) # if defined(__aarch64__)
# define Q_PROCESSOR_ARM_64 # define Q_PROCESSOR_ARM_64
# else # else
# define Q_PROCESSOR_ARM_32 # define Q_PROCESSOR_ARM_32
......
This diff is collapsed.
...@@ -186,31 +186,37 @@ public: ...@@ -186,31 +186,37 @@ public:
private: private:
friend class QAndroidJniObject; friend class QAndroidJniObject;
QJNIObjectPrivate(const char *className, const char *sig, va_list args); struct QVaListPrivate { operator va_list &() const { return m_args; } va_list &m_args; };
QJNIObjectPrivate(jclass clazz, const char *sig, va_list args);
QJNIObjectPrivate(const char *className, const char *sig, const QVaListPrivate &args);
QJNIObjectPrivate(jclass clazz, const char *sig, const QVaListPrivate &args);
template <typename T> template <typename T>
T callMethod(const char *methodName, T callMethodV(const char *methodName,
const char *sig, const char *sig,
va_list args) const; va_list args) const;
QJNIObjectPrivate callObjectMethod(const char *methodName, QJNIObjectPrivate callObjectMethodV(const char *methodName,
const char *sig, const char *sig,
va_list args) const; va_list args) const;
template <typename T> template <typename T>
static T callStaticMethod(const char *className, static T callStaticMethodV(const char *className,
const char *methodName, const char *methodName,
const char *sig, va_list args); const char *sig,
va_list args);
template <typename T> template <typename T>
static T callStaticMethod(jclass clazz, static T callStaticMethodV(jclass clazz,
const char *methodName, const char *methodName,
const char *sig, va_list args); const char *sig,
static QJNIObjectPrivate callStaticObjectMethod(const char *className, va_list args);
const char *methodName, static QJNIObjectPrivate callStaticObjectMethodV(const char *className,
const char *sig, va_list args); const char *methodName,
const char *sig,
static QJNIObjectPrivate callStaticObjectMethod(jclass clazz, va_list args);
const char *methodName,
const char *sig, va_list args); static QJNIObjectPrivate callStaticObjectMethodV(jclass clazz,
const char *methodName,
const char *sig,
va_list args);
bool isSameObject(jobject obj) const; bool isSameObject(jobject obj) const;
bool isSameObject(const QJNIObjectPrivate &other) const; bool isSameObject(const QJNIObjectPrivate &other) const;
......
...@@ -426,9 +426,8 @@ QTranslator::~QTranslator() ...@@ -426,9 +426,8 @@ QTranslator::~QTranslator()
directory. Returns \c true if the translation is successfully loaded; directory. Returns \c true if the translation is successfully loaded;
otherwise returns \c false. otherwise returns \c false.
If \a directory is not specified, the directory of the If \a directory is not specified, the current directory is used
application's executable is used (i.e., as (i.e., as \l{QDir::}{currentPath()}).
\l{QCoreApplication::}{applicationDirPath()}).
The previous contents of this translator object are discarded. The previous contents of this translator object are discarded.
......
...@@ -71,7 +71,7 @@ Q_DECLARE_TYPEINFO(QStaticPlugin, Q_PRIMITIVE_TYPE); ...@@ -71,7 +71,7 @@ Q_DECLARE_TYPEINFO(QStaticPlugin, Q_PRIMITIVE_TYPE);
void Q_CORE_EXPORT qRegisterStaticPluginFunction(QStaticPlugin staticPlugin); void Q_CORE_EXPORT qRegisterStaticPluginFunction(QStaticPlugin staticPlugin);
#if defined (Q_OF_ELF) && (defined (Q_CC_GNU) || defined(Q_CC_CLANG)) #if (defined(Q_OF_ELF) || defined(Q_OS_WIN)) && (defined (Q_CC_GNU) || defined(Q_CC_CLANG))
# define QT_PLUGIN_METADATA_SECTION \ # define QT_PLUGIN_METADATA_SECTION \
__attribute__ ((section (".qtmetadata"))) __attribute__((used)) __attribute__ ((section (".qtmetadata"))) __attribute__((used))
#elif defined(Q_OS_MAC) #elif defined(Q_OS_MAC)
......
...@@ -84,13 +84,9 @@ QT_END_NAMESPACE ...@@ -84,13 +84,9 @@ QT_END_NAMESPACE
// New atomics // New atomics
#if defined(Q_COMPILER_CONSTEXPR) && defined(Q_COMPILER_DEFAULT_MEMBERS) && defined(Q_COMPILER_DELETE_MEMBERS) #if defined(Q_COMPILER_CONSTEXPR) && defined(Q_COMPILER_DEFAULT_MEMBERS) && defined(Q_COMPILER_DELETE_MEMBERS)
# if defined(Q_CC_CLANG) && ((((__clang_major__ * 100) + __clang_minor__) < 303) \ # if defined(Q_CC_CLANG) && Q_CC_CLANG < 303
|| defined(__apple_build_version__) \ /*
) Do not define QT_BASIC_ATOMIC_HAS_CONSTRUCTORS for Clang before version 3.3.
/* Do not define QT_BASIC_ATOMIC_HAS_CONSTRUCTORS for "stock" clang before version 3.3.
Apple's version has different (higher!) version numbers, so disable it for all of them for now.
(The only way to distinguish between them seems to be a check for __apple_build_version__ .)
For details about the bug: see http://llvm.org/bugs/show_bug.cgi?id=12670 For details about the bug: see http://llvm.org/bugs/show_bug.cgi?id=12670
*/ */
# else # else
......