summaryrefslogtreecommitdiff
path: root/ui
diff options
context:
space:
mode:
authorGerald Combs <gerald@wireshark.org>2014-10-06 16:02:16 -0700
committerGerald Combs <gerald@wireshark.org>2014-10-06 23:34:56 +0000
commit6397ad43c2374ebde388041f2bd7ac925606a51e (patch)
tree61f1d8750280013b351747da381771f75230de90 /ui
parenta17067abb1ef9a42babe95d3eb9908d746992154 (diff)
downloadwireshark-6397ad43c2374ebde388041f2bd7ac925606a51e.tar.gz
Revert "Qt: Try to fix a Visual C++ encoding warning."
Revert gafa8c02 since it didn't work on Windows. Use a pragma to squelch Visual C++ instead. Qt's rich text renderer doesn't handle "&apos;". Replace it with "&#x27;". Remove a QDebug include. Change-Id: I0e6308efda74a4bc0e67ce841a50a0a9b68f4a8b Reviewed-on: https://code.wireshark.org/review/4511 Reviewed-by: Gerald Combs <gerald@wireshark.org>
Diffstat (limited to 'ui')
-rw-r--r--ui/qt/simple_dialog.cpp8
-rw-r--r--ui/utf8_entities.h15
2 files changed, 12 insertions, 11 deletions
diff --git a/ui/qt/simple_dialog.cpp b/ui/qt/simple_dialog.cpp
index ea3ef218e4..f25a653faf 100644
--- a/ui/qt/simple_dialog.cpp
+++ b/ui/qt/simple_dialog.cpp
@@ -46,7 +46,11 @@
QList<MessagePair> message_queue_;
ESD_TYPE_E max_severity_ = ESD_TYPE_INFO;
-const char *primary_delimiter_ = UTF8_NONCHARACTER;
+#ifdef _MSC_VER
+// Disable "warning C4566: character represented by universal-character-name '\uFFFF' cannot be represented in the current code page (1252)"
+#pragma warning(disable:4566)
+#endif
+const char *primary_delimiter_ = "\uffff";
const char *
simple_dialog_primary_start(void) {
@@ -84,7 +88,6 @@ simple_error_message_box(const char *msg_format, ...)
va_end(ap);
}
-#include <QDebug>
SimpleDialog::SimpleDialog(QWidget *parent, ESD_TYPE_E type, int btn_mask, const char *msg_format, va_list ap) :
QMessageBox(parent)
{
@@ -95,6 +98,7 @@ SimpleDialog::SimpleDialog(QWidget *parent, ESD_TYPE_E type, int btn_mask, const
message = QTextCodec::codecForLocale()->toUnicode(vmessage);
g_free(vmessage);
+ setTextFormat(Qt::RichText);
MessagePair msg_pair = splitMessage(message);
QString primary = msg_pair.first;
QString secondary = msg_pair.second;
diff --git a/ui/utf8_entities.h b/ui/utf8_entities.h
index 06eb486ea5..18b0fc1a59 100644
--- a/ui/utf8_entities.h
+++ b/ui/utf8_entities.h
@@ -31,17 +31,14 @@
* and other places
*/
-#define UTF8_MIDDLE_DOT "\xc2\xb7" /* 183 / 0xb7 */
+#define UTF8_MIDDLE_DOT "\xc2\xb7" /* 183 / 0xb7 */
-#define UTF8_HORIZONTAL_ELLIPSIS "\xe2\x80\xa6" /* 8230 / 0x2026 */
-#define UTF8_LEFTWARDS_ARROW "\xe2\x86\x90" /* 8592 / 0x2190 */
-#define UTF8_RIGHTWARDS_ARROW "\xe2\x86\x92" /* 8594 / 0x2192 */
-#define UTF8_LEFT_RIGHT_ARROW "\xe2\x86\x94" /* 8596 / 0x2194 */
-
-#define UTF8_PLACE_OF_INTEREST_SIGN "\xe2\x8c\x98" /* 8984 / 0x2318 */
-
-#define UTF8_NONCHARACTER "\xef\xbf\xbf" /* 65535 / 0xffff */
+#define UTF8_HORIZONTAL_ELLIPSIS "\xe2\x80\xa6" /* 8230 / 0x2026 */
+#define UTF8_LEFTWARDS_ARROW "\xe2\x86\x90" /* 8592 / 0x2190 */
+#define UTF8_RIGHTWARDS_ARROW "\xe2\x86\x92" /* 8594 / 0x2192 */
+#define UTF8_LEFT_RIGHT_ARROW "\xe2\x86\x94" /* 8596 / 0x2194 */
+#define UTF8_PLACE_OF_INTEREST_SIGN "\xe2\x8c\x98" /* 8984 / 0x2318 */
#endif /* __UTF8_ENTITIES_H__ */
/*