]> granicus.if.org Git - graphviz/commitdiff
gvedit: remove unnecessary 'QString' construction
authorMatthew Fernandez <matthew.fernandez@gmail.com>
Sat, 9 Apr 2022 17:37:55 +0000 (10:37 -0700)
committerMatthew Fernandez <matthew.fernandez@gmail.com>
Thu, 28 Apr 2022 01:54:13 +0000 (18:54 -0700)
`QString::operator==` has an overload that takes `const char*`.

cmd/gvedit/csettings.cpp

index 3b0cee0c250f35954790c3e37a937151bdf5db1b..4d5ee765eb3bbdf84183fc419c8e7dced3965cc1 100644 (file)
@@ -377,7 +377,7 @@ bool CFrmSettings::renderLayout()
     QString sfx = WIDGET(QComboBox, cbExtension)->currentText();
     QString fileName(WIDGET(QLineEdit, leOutput)->text());
 
-    if (fileName == QString("") || sfx == QString("NONE"))
+    if (fileName == "" || sfx == "NONE")
        doPreview(QString());
     else {
        fileName = stripFileExtension(fileName);