Qt: fix build failure due to adding two incompatible pointers
authorPeter Wu <peter@lekensteyn.nl>
Sat, 17 Nov 2018 18:08:06 +0000 (19:08 +0100)
committerGuy Harris <guy@alum.mit.edu>
Sat, 17 Nov 2018 19:25:14 +0000 (19:25 +0000)
Change-Id: I08d45c87c9232edcabfc69d25a773552fe9e0871
Fixes: v2.9.0rc0-2567-g43872a3a0e (""." in version numbers and file names isn't translated into other languages.")
Reviewed-on: https://code.wireshark.org/review/30680
Reviewed-by: Peter Wu <peter@lekensteyn.nl>
Petri-Dish: Guy Harris <guy@alum.mit.edu>
Tested-by: Petri Dish Buildbot
Reviewed-by: Guy Harris <guy@alum.mit.edu>
ui/qt/main_window.cpp

index d67156639867e14dfb9032f1caf1e8fb831b0416..8b2f7ee5c2d64027e59f024a35ddce95dfff396f 100644 (file)
@@ -1652,7 +1652,7 @@ void MainWindow::fileAddExtension(QString &file_name, int file_type, wtap_compre
         /* OK, see if the file has one of those extensions. */
         for (extension = extensions_list; extension != NULL;
              extension = g_slist_next(extension)) {
-            QString file_suffix = "." + (char *)extension->data;
+            QString file_suffix = QString(".") + (char *)extension->data;
             if (file_name_lower.endsWith(file_suffix)) {
                 /*
                  * The file name has one of the extensions for
@@ -1677,7 +1677,7 @@ void MainWindow::fileAddExtension(QString &file_name, int file_type, wtap_compre
     }
     if (add_extension) {
         if (wtap_default_file_extension(file_type) != NULL) {
-            file_name += "." + wtap_default_file_extension(file_type);
+            file_name += QString(".") + wtap_default_file_extension(file_type);
             if (compression_type == WTAP_GZIP_COMPRESSED) {
                 file_name += ".gz";
             }