Merge #17702: gui: Move static placeholder texts to forms

a652dc5521e2caf5734ffb797c7f2fc80685fef1 qt: Normalize placeholder to avoid using "address book" in sendcoinsentry (Wladimir J. van der Laan)
67f36e0b2ce0f99b90578e7e1dd9e0624026bcfa gui: Move static placeholder texts to forms (Wladimir J. van der Laan)

Pull request description:

  There was an issue around the time of Qt 4.6 when placeholder text was introduced, that caused a compile failure when it was specified in the form.

  As a workaround the placeholder texts were moved to the code.

  Qt 4 hasn't been relevant to us for ages. So move all (non-parametrized) placeholder texts to the form files instead.

  It's better to keep this kind of text content together. Translate/no-translate status is kept as it is.

  Proof that they still work:
  ![win1](https://user-images.githubusercontent.com/126646/70428014-0e80b300-1a76-11ea-9a6d-be78a0bf14ed.png)

  ![win2](https://user-images.githubusercontent.com/126646/70428019-10e30d00-1a76-11ea-8016-ffa0c4eafe34.png)

  ![win3](https://user-images.githubusercontent.com/126646/70428021-13456700-1a76-11ea-9449-9413487e39f6.png)

  ![win4](https://user-images.githubusercontent.com/126646/70428025-150f2a80-1a76-11ea-92ad-be5f3c171c43.png)

ACKs for top commit:
  hebasto:
    Re-ACK a652dc5521e2caf5734ffb797c7f2fc80685fef1, `tooltip` and `placeholderText` are identical now.
  MarcoFalke:
    ACK a652dc5521e2caf5734ffb797c7f2fc80685fef1 🚿
  fanquake:
    ACK a652dc5521e2caf5734ffb797c7f2fc80685fef1 - checked that placeholder text still appears.

Tree-SHA512: 7d3c1faeef2eb5d4b195d9d78f2a3f161296d869e5059b5e8d308167e3c6c668a3ebabec93dc592762ba15bfc86d51985e20c4e17f1065c8dce84fec036ff5ee
This commit is contained in:
MarcoFalke 2019-12-09 13:50:31 -05:00 committed by Konstantin Akimov
parent 4c1477c7b3
commit e043d4b98b
8 changed files with 14 additions and 7 deletions

View File

@ -24,7 +24,11 @@
</widget>
</item>
<item>
<widget class="QValidatedLineEdit" name="uriEdit"/>
<widget class="QValidatedLineEdit" name="uriEdit">
<property name="placeholderText">
<string notr="true">dash:</string>
</property>
</widget>
</item>
</layout>
</item>

View File

@ -916,6 +916,9 @@ https://www.transifex.com/projects/p/dash/</string>
<property name="toolTip">
<string>Third party URLs (e.g. a block explorer) that appear in the transactions tab as context menu items.&lt;br/&gt;%s in the URL is replaced by transaction hash. Multiple URLs are separated by vertical bar |.</string>
</property>
<property name="placeholderText">
<string notr="true">https://example.com/tx/%s</string>
</property>
</widget>
</item>
</layout>

View File

@ -132,6 +132,9 @@
<property name="toolTip">
<string>Enter a label for this address to add it to the list of used addresses</string>
</property>
<property name="placeholderText">
<string>Enter a label for this address to add it to the list of used addresses</string>
</property>
</widget>
</item>
<item row="2" column="0">

View File

@ -140,6 +140,9 @@
</property>
<item>
<widget class="QLineEdit" name="signatureOut_SM">
<property name="placeholderText">
<string>Click "Sign Message" to generate signature</string>
</property>
<property name="readOnly">
<bool>true</bool>
</property>

View File

@ -18,7 +18,6 @@ OpenURIDialog::OpenURIDialog(QWidget *parent) :
ui->setupUi(this);
GUIUtil::updateFonts();
GUIUtil::disableMacFocusRect(this);
ui->uriEdit->setPlaceholderText("dash:");
}
OpenURIDialog::~OpenURIDialog()

View File

@ -160,8 +160,6 @@ OptionsDialog::OptionsDialog(QWidget *parent, bool enableWallet) :
ui->lang->addItem(locale.nativeLanguageName() + QString(" (") + langStr + QString(")"), QVariant(langStr));
}
}
ui->thirdPartyTxUrls->setPlaceholderText("https://example.com/tx/%s");
ui->unit->setModel(new BitcoinUnits(this));
/* Widget-to-option mapper */

View File

@ -29,8 +29,6 @@ SendCoinsEntry::SendCoinsEntry(QWidget* parent) :
setCurrentWidget(ui->SendCoins);
ui->addAsLabel->setPlaceholderText(tr("Enter a label for this address to add it to your address book"));
setButtonIcons();
// normal dash address field

View File

@ -34,7 +34,6 @@ SignVerifyMessageDialog::SignVerifyMessageDialog(QWidget* parent) :
connect(pageButtons, QOverload<int>::of(&QButtonGroup::buttonClicked), this, &SignVerifyMessageDialog::showPage);
ui->messageIn_SM->setPlaceholderText(tr("Enter a message to be signed"));
ui->signatureOut_SM->setPlaceholderText(tr("Click \"Sign Message\" to generate signature"));
ui->messageIn_VM->setPlaceholderText(tr("Enter a message to be verified"));
ui->signatureIn_VM->setPlaceholderText(tr("Enter a signature for the message to be verified"));