summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorKonstantin Ritt <ritt.ks@gmail.com>2012-05-21 15:51:37 +0300
committerQt by Nokia <qt-info@nokia.com>2012-05-25 21:48:44 +0200
commit2b15c1b30f8fb5b1b39705f0c60d489e8b5b4ede (patch)
treef0fbc113c2d4303a7d2b3f1c49e56d02257d8a16
parent7c1e0fef8e35ecd8487c41dc39e7ce46537f3040 (diff)
Move ScriptSentinel enum from header to .cpp
Change-Id: Ic74e8e2471e92aa2014735f6ab0bb4f3b88de206 Reviewed-by: Lars Knoll <lars.knoll@nokia.com>
-rw-r--r--src/corelib/tools/qunicodetables.cpp2
-rw-r--r--src/corelib/tools/qunicodetables_p.h1
-rw-r--r--util/unicode/main.cpp8
3 files changed, 6 insertions, 5 deletions
diff --git a/src/corelib/tools/qunicodetables.cpp b/src/corelib/tools/qunicodetables.cpp
index 9a2a36cd49..51555680d5 100644
--- a/src/corelib/tools/qunicodetables.cpp
+++ b/src/corelib/tools/qunicodetables.cpp
@@ -9559,6 +9559,8 @@ static const unsigned char uc_scripts[] = {
Common, Common, Common, Common, Common, Common, Common, Common
};
+enum { ScriptSentinel = 32 };
+
Q_CORE_EXPORT int QT_FASTCALL script(uint ucs4)
{
if (ucs4 > 0xffff)
diff --git a/src/corelib/tools/qunicodetables_p.h b/src/corelib/tools/qunicodetables_p.h
index 293f03b94f..37667d9311 100644
--- a/src/corelib/tools/qunicodetables_p.h
+++ b/src/corelib/tools/qunicodetables_p.h
@@ -157,7 +157,6 @@ namespace QUnicodeTables {
Phoenician = Common,
PhagsPa = Common
};
- enum { ScriptSentinel = 32 };
enum GraphemeBreak {
diff --git a/util/unicode/main.cpp b/util/unicode/main.cpp
index 4b3a52b088..b535ac8c8e 100644
--- a/util/unicode/main.cpp
+++ b/util/unicode/main.cpp
@@ -1913,12 +1913,10 @@ QByteArray createScriptEnumDeclaration()
declaration += " = Common";
}
- declaration += "\n };\n";
+ declaration += "\n };\n\n";
scriptSentinel = ((uniqueScripts + 16) / 32) * 32; // a multiple of 32
- declaration += " enum { ScriptSentinel = ";
- declaration += QByteArray::number(scriptSentinel);
- declaration += " };\n\n";
+
return declaration;
}
@@ -2017,6 +2015,8 @@ QByteArray createScriptTableDeclaration()
}
declaration += "\n};\n\n";
+ declaration += "enum { ScriptSentinel = " + QByteArray::number(scriptSentinel) + " };\n\n";
+
declaration +=
"Q_CORE_EXPORT int QT_FASTCALL script(uint ucs4)\n"
"{\n"