135 changes: 41 additions & 94 deletions tests/Tests.xcodeproj/project.pbxproj
Original file line number Diff line number Diff line change
Expand Up @@ -39,7 +39,6 @@
43E700B514F9852E00D419C5 /* PhysFS.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = 43E7008B14F9823C00D419C5 /* PhysFS.framework */; };
43E700B614F9852F00D419C5 /* Png.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = 43E7008914F9823C00D419C5 /* Png.framework */; };
43E700EA14F986B500D419C5 /* modeltest.c in Sources */ = {isa = PBXBuildFile; fileRef = 43E7009714F9826C00D419C5 /* modeltest.c */; };
43E7010C14F988C400D419C5 /* QtCore.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = 43E7FE8714F9823A00D419C5 /* QtCore.framework */; };
43E7010D14F988C500D419C5 /* QtScript.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = 43E7FE8814F9823A00D419C5 /* QtScript.framework */; };
43E7010E14F988CE00D419C5 /* PhysFS.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = 43E7008B14F9823C00D419C5 /* PhysFS.framework */; };
43E7010F14F9891100D419C5 /* lint.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 43E7009414F9826C00D419C5 /* lint.cpp */; };
Expand All @@ -49,6 +48,7 @@
43E7012814F98ADC00D419C5 /* PhysFS.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = 43E7008B14F9823C00D419C5 /* PhysFS.framework */; };
43E7012914F98AF800D419C5 /* qtscripttest.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 43E7009914F9826C00D419C5 /* qtscripttest.cpp */; };
43E7012A14F98AFE00D419C5 /* lint.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 43E7009414F9826C00D419C5 /* lint.cpp */; };
BC32B0741F3D212C0046142A /* QtCore.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = 43E7FE8714F9823A00D419C5 /* QtCore.framework */; };
/* End PBXBuildFile section */

/* Begin PBXContainerItemProxy section */
Expand Down Expand Up @@ -129,13 +129,6 @@
remoteGlobalIDString = 02356D830BD3BB4100E9A019;
remoteInfo = Zlib;
};
43E7008414F9823C00D419C5 /* PBXContainerItemProxy */ = {
isa = PBXContainerItemProxy;
containerPortal = 43E7FE8A14F9823A00D419C5 /* Warzone.xcodeproj */;
proxyType = 2;
remoteGlobalIDString = 43CCDD1B14BA474E00B21363;
remoteInfo = Fribidi;
};
43E7008614F9823C00D419C5 /* PBXContainerItemProxy */ = {
isa = PBXContainerItemProxy;
containerPortal = 43E7FE8A14F9823A00D419C5 /* Warzone.xcodeproj */;
Expand Down Expand Up @@ -178,13 +171,6 @@
remoteGlobalIDString = 97AEAB330E8C1B5200A10721;
remoteInfo = Theora;
};
43E7009214F9823C00D419C5 /* PBXContainerItemProxy */ = {
isa = PBXContainerItemProxy;
containerPortal = 43E7FE8A14F9823A00D419C5 /* Warzone.xcodeproj */;
proxyType = 2;
remoteGlobalIDString = 4366718213D1FD5600FE85BA;
remoteInfo = QuesoGLC;
};
43E700B114F9851500D419C5 /* PBXContainerItemProxy */ = {
isa = PBXContainerItemProxy;
containerPortal = 43E7FE8A14F9823A00D419C5 /* Warzone.xcodeproj */;
Expand Down Expand Up @@ -234,6 +220,20 @@
remoteGlobalIDString = 02DDA8B00BD3C2F20049AB60;
remoteInfo = PhysFS;
};
BC32B0701F3D20DE0046142A /* PBXContainerItemProxy */ = {
isa = PBXContainerItemProxy;
containerPortal = 43E7FE8A14F9823A00D419C5 /* Warzone.xcodeproj */;
proxyType = 2;
remoteGlobalIDString = BCC95D101F3CE4D200A243A4;
remoteInfo = FreeType;
};
BC32B0721F3D20DE0046142A /* PBXContainerItemProxy */ = {
isa = PBXContainerItemProxy;
containerPortal = 43E7FE8A14F9823A00D419C5 /* Warzone.xcodeproj */;
proxyType = 2;
remoteGlobalIDString = BC80238F1F3D032C001E75F8;
remoteInfo = Harfbuzz;
};
/* End PBXContainerItemProxy section */

/* Begin PBXFileReference section */
Expand Down Expand Up @@ -295,7 +295,7 @@
isa = PBXFrameworksBuildPhase;
buildActionMask = 2147483647;
files = (
43E7010C14F988C400D419C5 /* QtCore.framework in Frameworks */,
BC32B0741F3D212C0046142A /* QtCore.framework in Frameworks */,
43E7010D14F988C500D419C5 /* QtScript.framework in Frameworks */,
43E7010E14F988CE00D419C5 /* PhysFS.framework in Frameworks */,
);
Expand Down Expand Up @@ -410,14 +410,14 @@
43E7007F14F9823C00D419C5 /* MiniUPnPc.framework */,
43E7008114F9823C00D419C5 /* GLExtensionWrangler.framework */,
43E7008314F9823C00D419C5 /* Zlib.framework */,
43E7008514F9823C00D419C5 /* fribidi.framework */,
43E7008714F9823C00D419C5 /* Ogg.framework */,
43E7008914F9823C00D419C5 /* Png.framework */,
43E7008B14F9823C00D419C5 /* PhysFS.framework */,
43E7008D14F9823C00D419C5 /* Vorbis.framework */,
43E7008F14F9823C00D419C5 /* Gettext.framework */,
43E7008F14F9823C00D419C5 /* Libintl.framework */,
43E7009114F9823C00D419C5 /* Theora.framework */,
43E7009314F9823C00D419C5 /* QuesoGLC.framework */,
BC32B0711F3D20DE0046142A /* FreeType.framework */,
BC32B0731F3D20DE0046142A /* Harfbuzz.framework */,
);
name = Products;
sourceTree = "<group>";
Expand Down Expand Up @@ -572,13 +572,6 @@
remoteRef = 43E7008214F9823C00D419C5 /* PBXContainerItemProxy */;
sourceTree = BUILT_PRODUCTS_DIR;
};
43E7008514F9823C00D419C5 /* fribidi.framework */ = {
isa = PBXReferenceProxy;
fileType = wrapper.framework;
path = fribidi.framework;
remoteRef = 43E7008414F9823C00D419C5 /* PBXContainerItemProxy */;
sourceTree = BUILT_PRODUCTS_DIR;
};
43E7008714F9823C00D419C5 /* Ogg.framework */ = {
isa = PBXReferenceProxy;
fileType = wrapper.framework;
Expand Down Expand Up @@ -607,10 +600,10 @@
remoteRef = 43E7008C14F9823C00D419C5 /* PBXContainerItemProxy */;
sourceTree = BUILT_PRODUCTS_DIR;
};
43E7008F14F9823C00D419C5 /* Gettext.framework */ = {
43E7008F14F9823C00D419C5 /* Libintl.framework */ = {
isa = PBXReferenceProxy;
fileType = wrapper.framework;
path = Gettext.framework;
path = Libintl.framework;
remoteRef = 43E7008E14F9823C00D419C5 /* PBXContainerItemProxy */;
sourceTree = BUILT_PRODUCTS_DIR;
};
Expand All @@ -621,11 +614,18 @@
remoteRef = 43E7009014F9823C00D419C5 /* PBXContainerItemProxy */;
sourceTree = BUILT_PRODUCTS_DIR;
};
43E7009314F9823C00D419C5 /* QuesoGLC.framework */ = {
BC32B0711F3D20DE0046142A /* FreeType.framework */ = {
isa = PBXReferenceProxy;
fileType = wrapper.framework;
path = FreeType.framework;
remoteRef = BC32B0701F3D20DE0046142A /* PBXContainerItemProxy */;
sourceTree = BUILT_PRODUCTS_DIR;
};
BC32B0731F3D20DE0046142A /* Harfbuzz.framework */ = {
isa = PBXReferenceProxy;
fileType = wrapper.framework;
path = QuesoGLC.framework;
remoteRef = 43E7009214F9823C00D419C5 /* PBXContainerItemProxy */;
path = Harfbuzz.framework;
remoteRef = BC32B0721F3D20DE0046142A /* PBXContainerItemProxy */;
sourceTree = BUILT_PRODUCTS_DIR;
};
/* End PBXReferenceProxy section */
Expand Down Expand Up @@ -839,38 +839,22 @@
isa = XCBuildConfiguration;
baseConfigurationReference = 43E7FE2F14F97D2A00D419C5 /* maptest-Debug.xcconfig */;
buildSettings = {
ARCHS = "$(ARCHS_STANDARD_64_BIT)";
SDKROOT = macosx;
};
name = Debug;
};
43E700A514F9830C00D419C5 /* Release */ = {
isa = XCBuildConfiguration;
baseConfigurationReference = 43E7FE3014F97D2A00D419C5 /* maptest-Release.xcconfig */;
buildSettings = {
ARCHS = "$(ARCHS_STANDARD_64_BIT)";
SDKROOT = macosx;
};
name = Release;
};
43E700D614F9859500D419C5 /* StaticAnalyzer */ = {
isa = XCBuildConfiguration;
baseConfigurationReference = 43E7FE3614F97D2A00D419C5 /* Project-All.xcconfig */;
buildSettings = {
CLANG_WARN_BOOL_CONVERSION = YES;
CLANG_WARN_CONSTANT_CONVERSION = YES;
CLANG_WARN_EMPTY_BODY = YES;
CLANG_WARN_ENUM_CONVERSION = YES;
CLANG_WARN_INT_CONVERSION = YES;
CLANG_WARN_UNREACHABLE_CODE = YES;
CLANG_WARN__DUPLICATE_METHOD_MATCH = YES;
ENABLE_STRICT_OBJC_MSGSEND = YES;
GCC_WARN_64_TO_32_BIT_CONVERSION = YES;
GCC_WARN_ABOUT_RETURN_TYPE = YES;
GCC_WARN_UNDECLARED_SELECTOR = YES;
GCC_WARN_UNINITIALIZED_AUTOS = YES;
GCC_WARN_UNUSED_FUNCTION = YES;
GCC_WARN_UNUSED_VARIABLE = YES;
FRAMEWORK_SEARCH_PATHS_QUOTED_2 = "\"$(BUILT_PRODUCTS_DIR)\"";
LIBRARY_SEARCH_PATHS_QUOTED_2 = "";
};
name = StaticAnalyzer;
};
Expand All @@ -885,107 +869,82 @@
isa = XCBuildConfiguration;
baseConfigurationReference = 43E7FE3114F97D2A00D419C5 /* maptest-StaticAnalyzer.xcconfig */;
buildSettings = {
ARCHS = "$(ARCHS_STANDARD_64_BIT)";
SDKROOT = macosx;
};
name = StaticAnalyzer;
};
43E700E214F9862500D419C5 /* Debug */ = {
isa = XCBuildConfiguration;
baseConfigurationReference = 43E7FE3314F97D2A00D419C5 /* modeltest-Debug.xcconfig */;
buildSettings = {
SDKROOT = macosx;
};
name = Debug;
};
43E700E314F9862500D419C5 /* StaticAnalyzer */ = {
isa = XCBuildConfiguration;
baseConfigurationReference = 43E7FE3514F97D2A00D419C5 /* modeltest-StaticAnalyzer.xcconfig */;
buildSettings = {
SDKROOT = macosx;
};
name = StaticAnalyzer;
};
43E700E414F9862500D419C5 /* Release */ = {
isa = XCBuildConfiguration;
baseConfigurationReference = 43E7FE3414F97D2A00D419C5 /* modeltest-Release.xcconfig */;
buildSettings = {
SDKROOT = macosx;
};
name = Release;
};
43E7010214F9888000D419C5 /* Debug */ = {
isa = XCBuildConfiguration;
baseConfigurationReference = 43E7FE3814F97D2A00D419C5 /* qslint-Debug.xcconfig */;
buildSettings = {
ARCHS = "$(ARCHS_STANDARD_64_BIT)";
SDKROOT = macosx;
LIBRARY_SEARCH_PATHS_QUOTED_2 = "\"$(BUILT_PRODUCTS_DIR)\"";
};
name = Debug;
};
43E7010314F9888000D419C5 /* StaticAnalyzer */ = {
isa = XCBuildConfiguration;
baseConfigurationReference = 43E7FE3A14F97D2A00D419C5 /* qslint-StaticAnalyzer.xcconfig */;
buildSettings = {
ARCHS = "$(ARCHS_STANDARD_64_BIT)";
SDKROOT = macosx;
LIBRARY_SEARCH_PATHS_QUOTED_2 = "\"$(BUILT_PRODUCTS_DIR)\"";
};
name = StaticAnalyzer;
};
43E7010414F9888000D419C5 /* Release */ = {
isa = XCBuildConfiguration;
baseConfigurationReference = 43E7FE3914F97D2A00D419C5 /* qslint-Release.xcconfig */;
buildSettings = {
ARCHS = "$(ARCHS_STANDARD_64_BIT)";
SDKROOT = macosx;
LIBRARY_SEARCH_PATHS_QUOTED_2 = "\"$(BUILT_PRODUCTS_DIR)\"";
};
name = Release;
};
43E7011814F989BD00D419C5 /* Debug */ = {
isa = XCBuildConfiguration;
baseConfigurationReference = 43E7FE3C14F97D2A00D419C5 /* qtscripttest-Debug.xcconfig */;
buildSettings = {
ARCHS = "$(ARCHS_STANDARD_64_BIT)";
SDKROOT = macosx;
};
name = Debug;
};
43E7011914F989BD00D419C5 /* StaticAnalyzer */ = {
isa = XCBuildConfiguration;
baseConfigurationReference = 43E7FE3E14F97D2A00D419C5 /* qtscripttest-StaticAnalyzer.xcconfig */;
buildSettings = {
ARCHS = "$(ARCHS_STANDARD_64_BIT)";
SDKROOT = macosx;
};
name = StaticAnalyzer;
};
43E7011A14F989BD00D419C5 /* Release */ = {
isa = XCBuildConfiguration;
baseConfigurationReference = 43E7FE3D14F97D2A00D419C5 /* qtscripttest-Release.xcconfig */;
buildSettings = {
ARCHS = "$(ARCHS_STANDARD_64_BIT)";
SDKROOT = macosx;
};
name = Release;
};
43E7FE1414F9771800D419C5 /* Debug */ = {
isa = XCBuildConfiguration;
baseConfigurationReference = 43E7FE3614F97D2A00D419C5 /* Project-All.xcconfig */;
buildSettings = {
CLANG_WARN_BOOL_CONVERSION = YES;
CLANG_WARN_CONSTANT_CONVERSION = YES;
CLANG_WARN_EMPTY_BODY = YES;
CLANG_WARN_ENUM_CONVERSION = YES;
CLANG_WARN_INT_CONVERSION = YES;
CLANG_WARN_UNREACHABLE_CODE = YES;
CLANG_WARN__DUPLICATE_METHOD_MATCH = YES;
ENABLE_STRICT_OBJC_MSGSEND = YES;
GCC_WARN_64_TO_32_BIT_CONVERSION = YES;
GCC_WARN_ABOUT_RETURN_TYPE = YES;
GCC_WARN_UNDECLARED_SELECTOR = YES;
GCC_WARN_UNINITIALIZED_AUTOS = YES;
GCC_WARN_UNUSED_FUNCTION = YES;
GCC_WARN_UNUSED_VARIABLE = YES;
ENABLE_TESTABILITY = YES;
FRAMEWORK_SEARCH_PATHS_QUOTED_2 = "\"$(BUILT_PRODUCTS_DIR)\"";
LIBRARY_SEARCH_PATHS_QUOTED_2 = "";
ONLY_ACTIVE_ARCH = YES;
};
name = Debug;
Expand All @@ -994,20 +953,8 @@
isa = XCBuildConfiguration;
baseConfigurationReference = 43E7FE3614F97D2A00D419C5 /* Project-All.xcconfig */;
buildSettings = {
CLANG_WARN_BOOL_CONVERSION = YES;
CLANG_WARN_CONSTANT_CONVERSION = YES;
CLANG_WARN_EMPTY_BODY = YES;
CLANG_WARN_ENUM_CONVERSION = YES;
CLANG_WARN_INT_CONVERSION = YES;
CLANG_WARN_UNREACHABLE_CODE = YES;
CLANG_WARN__DUPLICATE_METHOD_MATCH = YES;
ENABLE_STRICT_OBJC_MSGSEND = YES;
GCC_WARN_64_TO_32_BIT_CONVERSION = YES;
GCC_WARN_ABOUT_RETURN_TYPE = YES;
GCC_WARN_UNDECLARED_SELECTOR = YES;
GCC_WARN_UNINITIALIZED_AUTOS = YES;
GCC_WARN_UNUSED_FUNCTION = YES;
GCC_WARN_UNUSED_VARIABLE = YES;
FRAMEWORK_SEARCH_PATHS_QUOTED_2 = "\"$(BUILT_PRODUCTS_DIR)\"";
LIBRARY_SEARCH_PATHS_QUOTED_2 = "";
};
name = Release;
};
Expand Down
1 change: 1 addition & 0 deletions tests/configs/Base-Tests.xcconfig
Original file line number Diff line number Diff line change
Expand Up @@ -15,3 +15,4 @@ USER_HEADER_SEARCH_PATHS = "$(SRCROOT)/.." "$(SRCROOT)/../tools" "$(SRCROOT)"
srcdir = $(SRCROOT)

RUNPATH_TESTS = @loader_path @loader_path/. @loader_path/../macosx/build/$(CONFIGURATION) @loader_path/../macosx/build/$(CONFIGURATION)/. @loader_path/Warzone.app/Contents/Frameworks /Applications/Warzone.app/Contents/Frameworks

59 changes: 55 additions & 4 deletions tests/configs/Project-All.xcconfig
Original file line number Diff line number Diff line change
Expand Up @@ -2,17 +2,19 @@


ARCHS = x86_64
SDKROOT = macosx
SDKROOT = macosx // Use latest macOS SDK
DEBUG_INFORMATION_FORMAT = dwarf-with-dsym
GCC_VERSION = com.apple.compilers.llvm.clang.1_0
MACOSX_DEPLOYMENT_TARGET = 10.6
MACOSX_DEPLOYMENT_TARGET = 10.9
COPY_PHASE_STRIP = NO
DEAD_CODE_STRIPPING = YES
GCC_AUTO_VECTORIZATION = YES
GCC_GENERATE_DEBUGGING_SYMBOLS = YES
GCC_DEBUGGING_SYMBOLS = full
GCC_C_LANGUAGE_STANDARD = gnu99
GCC_ALTIVEC_EXTENSIONS = YES
GCC_C_LANGUAGE_STANDARD = c11
CLANG_CXX_LANGUAGE_STANDARD = c++0x
CLANG_CXX_LIBRARY = libc++

OTHER_CFLAGS = $(inherited)
GCC_PREPROCESSOR_DEFINITIONS = $(inherited) __MACOSX__

Expand All @@ -25,3 +27,52 @@ LIBRARY_SEARCH_PATHS_QUOTED_2 = "$(SRCROOT)/../macosx/build/$(CONFIGURATION)"
LIBRARY_SEARCH_PATHS_QUOTED_3 = "$(SRCROOT)/../macosx/external/QT"

HEADER_SEARCH_PATHS_QUOTED_1 = "$(SRCROOT)/../macosx/external/glew/include/**"

CLANG_ENABLE_OBJC_ARC = YES
GCC_NO_COMMON_BLOCKS = YES

CLANG_ANALYZER_LOCALIZABILITY_NONLOCALIZED = YES

// Preprocessing
ENABLE_STRICT_OBJC_MSGSEND = YES

// Objective-C Warnings
CLANG_WARN_DIRECT_OBJC_ISA_USAGE = YES
CLANG_WARN__DUPLICATE_METHOD_MATCH = YES
CLANG_WARN_OBJC_IMPLICIT_ATOMIC_PROPERTIES = YES
CLANG_WARN_OBJC_LITERAL_CONVERSION = YES
GCC_WARN_ALLOW_INCOMPLETE_PROTOCOL = YES
CLANG_WARN_DEPRECATED_OBJC_IMPLEMENTATIONS = YES
GCC_WARN_STRICT_SELECTOR_MATCH = YES
GCC_WARN_UNDECLARED_SELECTOR = YES

// Warnings
CLANG_WARN_BLOCK_CAPTURE_AUTORELEASING = YES
CLANG_WARN_EMPTY_BODY = YES
GCC_WARN_FOUR_CHARACTER_CONSTANTS = YES
CLANG_WARN_BOOL_CONVERSION = YES
CLANG_WARN_CONSTANT_CONVERSION = YES
GCC_WARN_64_TO_32_BIT_CONVERSION = YES
CLANG_WARN_ENUM_CONVERSION = YES
CLANG_WARN_INT_CONVERSION = YES
CLANG_WARN_NON_LITERAL_NULL_CONVERSION = YES
GCC_WARN_ABOUT_RETURN_TYPE = YES
CLANG_WARN_IMPLICIT_SIGN_CONVERSION = NO // Can't enable this because of Qt
CLANG_WARN_INFINITE_RECURSION = YES
GCC_WARN_INITIALIZER_NOT_FULLY_BRACKETED = YES
GCC_WARN_ABOUT_MISSING_FIELD_INITIALIZERS = YES
CLANG_WARN_ASSIGN_ENUM = YES
GCC_WARN_SIGN_COMPARE = YES
CLANG_WARN_COMMA = YES
GCC_WARN_UNINITIALIZED_AUTOS = YES
GCC_WARN_UNKNOWN_PRAGMAS = YES
CLANG_WARN_UNREACHABLE_CODE = YES
GCC_WARN_UNUSED_FUNCTION = YES
GCC_WARN_UNUSED_LABEL = YES
GCC_WARN_UNUSED_VARIABLE = YES

// C++ Warnings
GCC_WARN_NON_VIRTUAL_DESTRUCTOR = YES
GCC_WARN_HIDDEN_VIRTUAL_FUNCTIONS = YES
CLANG_WARN_SUSPICIOUS_MOVE = YES

4 changes: 3 additions & 1 deletion tests/configs/qslint-All.xcconfig
Original file line number Diff line number Diff line change
Expand Up @@ -32,9 +32,11 @@ GCC_WARN_UNUSED_FUNCTION = YES // -Wunused-function
GCC_WARN_UNUSED_LABEL = YES // -Wunused-label
GCC_WARN_UNUSED_VALUE = YES // -Wunused-value
GCC_WARN_UNUSED_VARIABLE = YES // -Wunused-variable
GCC_WARN_UNUSED_PARAMETER = NO // FIXME: Hides some "Unused parameter" warnings; these should be fixed at some point
CLANG_WARN_SUSPICIOUS_IMPLICIT_CONVERSION = YES

// Build setting dependent warnings
WarnForCandCpp = -Wall -Wextra -Wcast-align -Wwrite-strings -Wpointer-arith $(WarnForCandCppDep)
WarnForCandCpp = -Wall -Wcast-align -Wwrite-strings -Wpointer-arith $(WarnForCandCppDep)
WarnForC = -Wstrict-prototypes -Wdeclaration-after-statement $(WarnForCDep)
WarnForCpp = $(WarnForCppDep)

Expand Down
12 changes: 6 additions & 6 deletions tests/lint.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -197,7 +197,7 @@ static bool callFunction(QScriptEngine *engine, QString function, QScriptValueLi
QScriptValue value = engine->globalObject().property(function);
if (!value.isValid() || !value.isFunction())
{
ASSERT(!required, "Function %s not found", function.toAscii().constData());
ASSERT(!required, "Function %s not found", function.toUtf8().constData());
return false; // not necessarily an error, may just be a trigger that is not defined (ie not needed)
}
QScriptValue result = value.call(QScriptValue(), args);
Expand All @@ -207,10 +207,10 @@ static bool callFunction(QScriptEngine *engine, QString function, QScriptValueLi
QStringList bt = engine->uncaughtExceptionBacktrace();
for (int i = 0; i < bt.size(); i++)
{
fprintf(stderr, "%d : %s\n", i, bt.at(i).toAscii().constData());
fprintf(stderr, "%d : %s\n", i, bt.at(i).toUtf8().constData());
}
fprintf(stderr, "Uncaught exception calling function \"%s\" at line %d: %s\n",
function.toAscii().constData(), line, result.toString().toAscii().constData());
function.toUtf8().constData(), line, result.toString().toUtf8().constData());
return false;
}
return true;
Expand Down Expand Up @@ -768,7 +768,7 @@ static QScriptValue js_removeTimer(QScriptContext *context, QScriptEngine *)
}
}
QString warnName = function.left(15) + "...";
SCRIPT_ASSERT(context, false, "Did not find timer %s to remove", warnName.toAscii().constData());
SCRIPT_ASSERT(context, false, "Did not find timer %s to remove", warnName.toUtf8().constData());
return QScriptValue();
}

Expand Down Expand Up @@ -1123,14 +1123,14 @@ bool testPlayerScript(QString path, int player, int difficulty)
QScriptSyntaxCheckResult syntax = QScriptEngine::checkSyntax(source);
if (syntax.state() != QScriptSyntaxCheckResult::Valid)
{
qFatal("Syntax error in %s line %d: %s", path.toAscii().constData(), syntax.errorLineNumber(), syntax.errorMessage().toAscii().constData());
qFatal("Syntax error in %s line %d: %s", path.toUtf8().constData(), syntax.errorLineNumber(), syntax.errorMessage().toUtf8().constData());
return false;
}
QScriptValue result = engine->evaluate(source, path);
if (engine->hasUncaughtException())
{
int line = engine->uncaughtExceptionLineNumber();
qFatal("Uncaught exception at line %d, file %s: %s", line, path.toAscii().constData(), result.toString().toAscii().constData());
qFatal("Uncaught exception at line %d, file %s: %s", line, path.toUtf8().constData(), result.toString().toUtf8().constData());
return false;
}

Expand Down