Format some QLabels as plain text
authorClaudio Cambra <claudio.cambra@nextcloud.com>
Wed, 7 Dec 2022 15:46:37 +0000 (16:46 +0100)
committerMatthieu Gallien <matthieu_gallien@yahoo.fr>
Wed, 7 Dec 2022 16:18:57 +0000 (17:18 +0100)
Signed-off-by: Claudio Cambra <claudio.cambra@nextcloud.com>
src/gui/conflictdialog.cpp
src/gui/creds/webflowcredentialsdialog.cpp
src/gui/invalidfilenamedialog.cpp
src/gui/invalidfilenamedialog.ui
src/gui/wizard/owncloudadvancedsetuppage.cpp
src/gui/wizard/owncloudadvancedsetuppage.ui

index 74ce2034b064fd2fe5776fed2587b21f8b98809c..bae7b190f957aff699be9c7e89aba14629570c0a 100644 (file)
@@ -53,6 +53,8 @@ ConflictDialog::ConflictDialog(QWidget *parent)
     _ui->buttonBox->button(QDialogButtonBox::Ok)->setEnabled(false);
     _ui->buttonBox->button(QDialogButtonBox::Ok)->setText(tr("Keep selected version"));
 
+    _ui->conflictMessage->setTextFormat(Qt::PlainText);
+
     connect(_ui->localVersionRadio, &QCheckBox::toggled, this, &ConflictDialog::updateButtonStates);
     connect(_ui->localVersionButton, &QToolButton::clicked, this, [=] {
         QDesktopServices::openUrl(QUrl::fromLocalFile(_solver->localVersionFilename()));
index dce3d43a1495ceb323a7883869700346caf14303..8bb1eb90eb4f069e207c5152b0bb20ac1d090992 100644 (file)
@@ -36,6 +36,7 @@ WebFlowCredentialsDialog::WebFlowCredentialsDialog(Account *account, bool useFlo
     _containerLayout->setMargin(margin);
 
     _infoLabel = new QLabel();
+    _infoLabel->setTextFormat(Qt::PlainText);
     _infoLabel->setAlignment(Qt::AlignCenter);
     _containerLayout->addWidget(_infoLabel);
 
@@ -65,6 +66,7 @@ WebFlowCredentialsDialog::WebFlowCredentialsDialog(Account *account, bool useFlo
     connect(app, &Application::isShowingSettingsDialog, this, &WebFlowCredentialsDialog::slotShowSettingsDialog);
 
     _errorLabel = new QLabel();
+    _errorLabel->setTextFormat(Qt::PlainText);
     _errorLabel->hide();
     _containerLayout->addWidget(_errorLabel);
 
index a55771c36862abff076c75781f672899a0cc8247..366596c61c547d3179da45d3ec35e82f739206ef 100644 (file)
@@ -85,6 +85,9 @@ InvalidFilenameDialog::InvalidFilenameDialog(AccountPtr account, Folder *folder,
     _ui->buttonBox->button(QDialogButtonBox::Ok)->setEnabled(false);
     _ui->buttonBox->button(QDialogButtonBox::Ok)->setText(tr("Rename file"));
 
+    _ui->descriptionLabel->setTextFormat(Qt::PlainText);
+    _ui->errorLabel->setTextFormat(Qt::PlainText);
+
     _ui->descriptionLabel->setText(tr("The file \"%1\" could not be synced because the name contains characters which are not allowed on this system.").arg(_originalFileName));
     _ui->explanationLabel->setText(tr("The following characters are not allowed on the system: * \" | & ? , ; : \\ / ~ < > leading/trailing spaces"));
     _ui->filenameLineEdit->setText(filePathFileInfo.fileName());
index 68008709deb158a503f04a8e28cc89bdf36c2a47..91ff3f7386bc5b0370fd7ac82412e1382af44a46 100644 (file)
@@ -6,7 +6,7 @@
    <rect>
     <x>0</x>
     <y>0</y>
-    <width>411</width>
+    <width>607</width>
     <height>192</height>
    </rect>
   </property>
@@ -22,6 +22,9 @@
      <property name="text">
       <string>The file could not be synced because it contains characters which are not allowed on this system.</string>
      </property>
+     <property name="textFormat">
+      <enum>Qt::PlainText</enum>
+     </property>
      <property name="alignment">
       <set>Qt::AlignLeading|Qt::AlignLeft|Qt::AlignTop</set>
      </property>
@@ -35,6 +38,9 @@
      <property name="text">
       <string>Error</string>
      </property>
+     <property name="textFormat">
+      <enum>Qt::PlainText</enum>
+     </property>
      <property name="alignment">
       <set>Qt::AlignLeading|Qt::AlignLeft|Qt::AlignTop</set>
      </property>
@@ -48,6 +54,9 @@
      <property name="text">
       <string>Please enter a new name for the file:</string>
      </property>
+     <property name="textFormat">
+      <enum>Qt::PlainText</enum>
+     </property>
      <property name="alignment">
       <set>Qt::AlignLeading|Qt::AlignLeft|Qt::AlignTop</set>
      </property>
      <property name="text">
       <string/>
      </property>
+     <property name="textFormat">
+      <enum>Qt::PlainText</enum>
+     </property>
     </widget>
    </item>
    <item>
index 5435cf71e3dc6cdc10c4907f08e921dafc4bda74..668a0171a6258213c248a16aa4e6e138ebefbb9b 100644 (file)
@@ -51,6 +51,11 @@ OwncloudAdvancedSetupPage::OwncloudAdvancedSetupPage(OwncloudWizard *wizard)
     _filePathLabel->setSizePolicy(QSizePolicy::Minimum, QSizePolicy::Fixed);
     _ui.locationsGridLayout->addWidget(_filePathLabel.data(), 3, 3);
 
+    _filePathLabel->setTextFormat(Qt::PlainText);
+    _ui.userNameLabel->setTextFormat(Qt::PlainText);
+    _ui.serverAddressLabel->setTextFormat(Qt::PlainText);
+    _ui.localFolderDescriptionLabel->setTextFormat(Qt::PlainText);
+
     registerField(QLatin1String("OCSyncFromScratch"), _ui.cbSyncFromScratch);
 
     auto sizePolicy = _progressIndi->sizePolicy();
index fe4acc5a34d177cd70869f7b2384b6ba4adafd54..5f51a2d824e10b2d23f91a02dca502a6234df27f 100644 (file)
@@ -37,7 +37,7 @@
         <string notr="true">TextLabel</string>
        </property>
        <property name="textFormat">
-        <enum>Qt::RichText</enum>
+        <enum>Qt::PlainText</enum>
        </property>
        <property name="alignment">
         <set>Qt::AlignCenter</set>
@@ -57,6 +57,9 @@
          <property name="text">
           <string notr="true">Avatar</string>
          </property>
+         <property name="textFormat">
+          <enum>Qt::PlainText</enum>
+         </property>
          <property name="alignment">
           <set>Qt::AlignCenter</set>
          </property>
@@ -73,6 +76,9 @@
          <property name="text">
           <string>&amp;Local Folder</string>
          </property>
+         <property name="textFormat">
+          <enum>Qt::PlainText</enum>
+         </property>
          <property name="alignment">
           <set>Qt::AlignCenter</set>
          </property>
         <widget class="QLabel" name="userNameLabel">
          <property name="font">
           <font>
-           <weight>75</weight>
            <bold>true</bold>
           </font>
          </property>
          <property name="text">
           <string>Username</string>
          </property>
+         <property name="textFormat">
+          <enum>Qt::PlainText</enum>
+         </property>
          <property name="alignment">
           <set>Qt::AlignCenter</set>
          </property>
         <widget class="QLabel" name="localFolderDescriptionLabel">
          <property name="font">
           <font>
-           <weight>75</weight>
            <bold>true</bold>
           </font>
          </property>
          <property name="text">
           <string>Local Folder</string>
          </property>
+         <property name="textFormat">
+          <enum>Qt::PlainText</enum>
+         </property>
          <property name="alignment">
           <set>Qt::AlignCenter</set>
          </property>
          <property name="text">
           <string notr="true">Free space</string>
          </property>
+         <property name="textFormat">
+          <enum>Qt::PlainText</enum>
+         </property>
          <property name="alignment">
           <set>Qt::AlignCenter</set>
          </property>
          <property name="text">
           <string>Server address</string>
          </property>
+         <property name="textFormat">
+          <enum>Qt::PlainText</enum>
+         </property>
          <property name="alignment">
           <set>Qt::AlignHCenter|Qt::AlignTop</set>
          </property>
          <property name="text">
           <string>Sync Logo</string>
          </property>
+         <property name="textFormat">
+          <enum>Qt::PlainText</enum>
+         </property>
          <property name="alignment">
           <set>Qt::AlignCenter</set>
          </property>
                <property name="text">
                 <string extracomment="Trailing part of &quot;Ask confirmation before syncing folder larger than&quot; ">MB</string>
                </property>
+               <property name="textFormat">
+                <enum>Qt::PlainText</enum>
+               </property>
               </widget>
              </item>
              <item>
               <property name="font">
                <font>
                 <pointsize>9</pointsize>
-                <weight>75</weight>
                 <bold>true</bold>
                </font>
               </property>
        <property name="text">
         <string notr="true">TextLabel</string>
        </property>
+       <property name="textFormat">
+        <enum>Qt::PlainText</enum>
+       </property>
       </widget>
      </item>
      <item>
         <string notr="true">TextLabel</string>
        </property>
        <property name="textFormat">
-        <enum>Qt::RichText</enum>
+        <enum>Qt::PlainText</enum>
        </property>
       </widget>
      </item>