forked from Silverfish/proton-bridge
feat(GODT-3046): removed unused error notifications, and added default user to bridge-gui-tester.
This commit is contained in:
@ -54,14 +54,6 @@ SettingsTab::SettingsTab(QWidget *parent)
|
||||
connect(ui_.buttonInternetOff, &QPushButton::clicked, []() { app().grpc().sendEvent(newInternetStatusEvent(false)); });
|
||||
connect(ui_.buttonShowMainWindow, &QPushButton::clicked, []() { app().grpc().sendEvent(newShowMainWindowEvent()); });
|
||||
connect(ui_.buttonAPICertIssue, &QPushButton::clicked, []() { app().grpc().sendEvent(newApiCertIssueEvent()); });
|
||||
connect(ui_.buttonDiskCacheUnavailable, &QPushButton::clicked, []() {
|
||||
app().grpc().sendEvent(
|
||||
newDiskCacheErrorEvent(grpc::DiskCacheErrorType::DISK_CACHE_UNAVAILABLE_ERROR));
|
||||
});
|
||||
connect(ui_.buttonDiskFull, &QPushButton::clicked, []() {
|
||||
app().grpc().sendEvent(
|
||||
newDiskCacheErrorEvent(grpc::DiskCacheErrorType::DISK_FULL_ERROR));
|
||||
});
|
||||
connectAddressError(ui_.buttonNoActiveKeyForRecipient, ui_.editAddressErrors, newNoActiveKeyForRecipientEvent);
|
||||
connectAddressError(ui_.buttonAddressChanged, ui_.editAddressErrors, newAddressChangedEvent);
|
||||
connectAddressError(ui_.buttonAddressChangedLogout, ui_.editAddressErrors, newAddressChangedLogoutEvent);
|
||||
@ -94,7 +86,6 @@ void SettingsTab::updateGUIState() {
|
||||
for (QWidget *widget: { ui_.groupVersion, ui_.groupGeneral, ui_.groupMail, ui_.groupPaths, ui_.groupCache }) {
|
||||
widget->setEnabled(!connected);
|
||||
}
|
||||
ui_.comboCacheError->setEnabled(!ui_.checkNextCacheChangeWillSucceed->isChecked());
|
||||
}
|
||||
|
||||
|
||||
@ -470,14 +461,6 @@ bool SettingsTab::nextCacheChangeWillSucceed() const {
|
||||
}
|
||||
|
||||
|
||||
//****************************************************************************************************************************************************
|
||||
/// \return The index of the selected cache error.
|
||||
//****************************************************************************************************************************************************
|
||||
qint32 SettingsTab::cacheError() const {
|
||||
return ui_.comboCacheError->currentIndex();
|
||||
}
|
||||
|
||||
|
||||
//****************************************************************************************************************************************************
|
||||
/// \return the value for the 'Automatic Update' check.
|
||||
//****************************************************************************************************************************************************
|
||||
@ -551,7 +534,6 @@ void SettingsTab::resetUI() {
|
||||
QDir().mkpath(cacheDir);
|
||||
ui_.editDiskCachePath->setText(QDir::toNativeSeparators(cacheDir));
|
||||
ui_.checkNextCacheChangeWillSucceed->setChecked(true);
|
||||
ui_.comboCacheError->setCurrentIndex(0);
|
||||
|
||||
ui_.checkAutomaticUpdate->setChecked(true);
|
||||
|
||||
|
||||
@ -74,7 +74,6 @@ public: // member functions.
|
||||
bool isPortFree() const; ///< Get the value for the "Is Port Free" check box.
|
||||
QString diskCachePath() const; ///< Get the value for the 'Disk Cache Path' edit.
|
||||
bool nextCacheChangeWillSucceed() const; ///< Get the value for the 'Next Cache Change will succeed' edit.
|
||||
qint32 cacheError() const; ///< Return the index of the selected cache error.
|
||||
bool isAutomaticUpdateOn() const; ///<Get the value for the 'Automatic Update' check box.
|
||||
|
||||
public slots:
|
||||
|
||||
@ -614,11 +614,8 @@
|
||||
<string>Bug Report</string>
|
||||
</property>
|
||||
<layout class="QGridLayout" name="gridLayout_3">
|
||||
<property name="verticalSpacing">
|
||||
<number>4</number>
|
||||
</property>
|
||||
<item row="0" column="3">
|
||||
<widget class="QLineEdit" name="editOSVersion">
|
||||
<item row="1" column="3">
|
||||
<widget class="QLineEdit" name="editAddress">
|
||||
<property name="minimumSize">
|
||||
<size>
|
||||
<width>0</width>
|
||||
@ -649,13 +646,39 @@
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
<item row="0" column="0">
|
||||
<widget class="QLabel" name="labelOSType">
|
||||
<item row="1" column="2">
|
||||
<widget class="QLabel" name="labelAddress">
|
||||
<property name="text">
|
||||
<string>OS Type</string>
|
||||
<string>Address</string>
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
<item row="0" column="0">
|
||||
<widget class="QLabel" name="labelOSType"/>
|
||||
</item>
|
||||
<item row="3" column="1" colspan="3">
|
||||
<widget class="QLabel" name="labelIncludeLogsValue">
|
||||
<property name="text">
|
||||
<string>?</string>
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
<item row="3" column="0">
|
||||
<widget class="QLabel" name="labelIncludeLogs"/>
|
||||
</item>
|
||||
<item row="2" column="0">
|
||||
<widget class="QLabel" name="labelDescription">
|
||||
<property name="text">
|
||||
<string>Description</string>
|
||||
</property>
|
||||
<property name="alignment">
|
||||
<set>Qt::AlignLeading|Qt::AlignLeft|Qt::AlignTop</set>
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
<item row="1" column="2">
|
||||
<widget class="QLabel" name="labelAddress"/>
|
||||
</item>
|
||||
<item row="3" column="0">
|
||||
<widget class="QLabel" name="labelIncludeLogs">
|
||||
<property name="text">
|
||||
@ -663,13 +686,6 @@
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
<item row="1" column="2">
|
||||
<widget class="QLabel" name="labelAddress">
|
||||
<property name="text">
|
||||
<string>Address</string>
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
<item row="0" column="2">
|
||||
<widget class="QLabel" name="labelOSVersion">
|
||||
<property name="text">
|
||||
@ -677,6 +693,74 @@
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
<item row="0" column="1">
|
||||
<widget class="QLineEdit" name="editOSType"/>
|
||||
</item>
|
||||
<item row="2" column="1" colspan="3">
|
||||
<widget class="QPlainTextEdit" name="editDescription">
|
||||
<property name="readOnly">
|
||||
<bool>true</bool>
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
<item row="1" column="1">
|
||||
<widget class="QLineEdit" name="editEmailClient">
|
||||
<property name="minimumSize">
|
||||
<size>
|
||||
<width>0</width>
|
||||
<height>0</height>
|
||||
</size>
|
||||
</property>
|
||||
<property name="baseSize">
|
||||
<size>
|
||||
<width>250</width>
|
||||
<height>0</height>
|
||||
</size>
|
||||
</property>
|
||||
<property name="text">
|
||||
<string/>
|
||||
</property>
|
||||
<property name="readOnly">
|
||||
<bool>true</bool>
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
<item row="3" column="1" colspan="3">
|
||||
<widget class="QLabel" name="labelIncludeLogsValue"/>
|
||||
</item>
|
||||
<item row="0" column="0">
|
||||
<widget class="QLabel" name="labelOSType">
|
||||
<property name="text">
|
||||
<string>OS Type</string>
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
<item row="2" column="0">
|
||||
<widget class="QLabel" name="labelDescription">
|
||||
<property name="text">
|
||||
<string>Description</string>
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
<item row="0" column="3">
|
||||
<widget class="QLineEdit" name="editOSVersion">
|
||||
<property name="minimumSize">
|
||||
<size>
|
||||
<width>0</width>
|
||||
<height>0</height>
|
||||
</size>
|
||||
</property>
|
||||
<property name="baseSize">
|
||||
<size>
|
||||
<width>250</width>
|
||||
<height>0</height>
|
||||
</size>
|
||||
</property>
|
||||
<property name="readOnly">
|
||||
<bool>true</bool>
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
<item row="0" column="1">
|
||||
<widget class="QLineEdit" name="editOSType">
|
||||
<property name="minimumSize">
|
||||
@ -696,39 +780,6 @@
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
<item row="3" column="1" colspan="3">
|
||||
<widget class="QLabel" name="labelIncludeLogsValue">
|
||||
<property name="text">
|
||||
<string>?</string>
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
<item row="2" column="0">
|
||||
<widget class="QLabel" name="labelDescription">
|
||||
<property name="text">
|
||||
<string>Description</string>
|
||||
</property>
|
||||
<property name="alignment">
|
||||
<set>Qt::AlignLeading|Qt::AlignLeft|Qt::AlignTop</set>
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
<item row="1" column="1">
|
||||
<widget class="QLineEdit" name="editEmailClient">
|
||||
<property name="minimumSize">
|
||||
<size>
|
||||
<width>0</width>
|
||||
<height>0</height>
|
||||
</size>
|
||||
</property>
|
||||
<property name="text">
|
||||
<string/>
|
||||
</property>
|
||||
<property name="readOnly">
|
||||
<bool>true</bool>
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
<item row="1" column="0">
|
||||
<widget class="QLabel" name="labelEmailClient">
|
||||
<property name="text">
|
||||
@ -736,13 +787,6 @@
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
<item row="2" column="1" colspan="4">
|
||||
<widget class="QPlainTextEdit" name="editDescription">
|
||||
<property name="readOnly">
|
||||
<bool>true</bool>
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
</layout>
|
||||
</widget>
|
||||
</item>
|
||||
@ -839,37 +883,6 @@
|
||||
</item>
|
||||
</layout>
|
||||
</item>
|
||||
<item>
|
||||
<layout class="QHBoxLayout" name="horizontalLayout_13">
|
||||
<item>
|
||||
<widget class="QPushButton" name="buttonDiskCacheUnavailable">
|
||||
<property name="text">
|
||||
<string>Disk Cache Unavailable</string>
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
<item>
|
||||
<widget class="QPushButton" name="buttonDiskFull">
|
||||
<property name="text">
|
||||
<string>Disk Full</string>
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
<item>
|
||||
<spacer name="horizontalSpacer_2">
|
||||
<property name="orientation">
|
||||
<enum>Qt::Horizontal</enum>
|
||||
</property>
|
||||
<property name="sizeHint" stdset="0">
|
||||
<size>
|
||||
<width>40</width>
|
||||
<height>1</height>
|
||||
</size>
|
||||
</property>
|
||||
</spacer>
|
||||
</item>
|
||||
</layout>
|
||||
</item>
|
||||
<item>
|
||||
<widget class="QGroupBox" name="groupBox">
|
||||
<property name="minimumSize">
|
||||
@ -936,59 +949,11 @@
|
||||
</widget>
|
||||
</item>
|
||||
<item>
|
||||
<layout class="QHBoxLayout" name="horizontalLayout_8">
|
||||
<property name="leftMargin">
|
||||
<number>0</number>
|
||||
<widget class="QCheckBox" name="checkNextCacheChangeWillSucceed">
|
||||
<property name="text">
|
||||
<string>Next Cache Change will succeed</string>
|
||||
</property>
|
||||
<property name="topMargin">
|
||||
<number>0</number>
|
||||
</property>
|
||||
<property name="rightMargin">
|
||||
<number>0</number>
|
||||
</property>
|
||||
<property name="bottomMargin">
|
||||
<number>0</number>
|
||||
</property>
|
||||
<item>
|
||||
<widget class="QCheckBox" name="checkNextCacheChangeWillSucceed">
|
||||
<property name="text">
|
||||
<string>Next Cache Change will succeed</string>
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
<item>
|
||||
<spacer name="horizontalSpacer_6">
|
||||
<property name="orientation">
|
||||
<enum>Qt::Horizontal</enum>
|
||||
</property>
|
||||
<property name="sizeHint" stdset="0">
|
||||
<size>
|
||||
<width>40</width>
|
||||
<height>1</height>
|
||||
</size>
|
||||
</property>
|
||||
</spacer>
|
||||
</item>
|
||||
<item>
|
||||
<widget class="QComboBox" name="comboCacheError">
|
||||
<item>
|
||||
<property name="text">
|
||||
<string>Disk Cache Unavailable</string>
|
||||
</property>
|
||||
</item>
|
||||
<item>
|
||||
<property name="text">
|
||||
<string>Can't Move Disk Cache</string>
|
||||
</property>
|
||||
</item>
|
||||
<item>
|
||||
<property name="text">
|
||||
<string>Disk Full</string>
|
||||
</property>
|
||||
</item>
|
||||
</widget>
|
||||
</item>
|
||||
</layout>
|
||||
</widget>
|
||||
</item>
|
||||
<item>
|
||||
<widget class="QCheckBox" name="checkNextBugReportWillSucceed">
|
||||
@ -1160,8 +1125,6 @@
|
||||
<tabstop>buttonInternetOn</tabstop>
|
||||
<tabstop>buttonShowMainWindow</tabstop>
|
||||
<tabstop>checkIsPortFree</tabstop>
|
||||
<tabstop>checkNextCacheChangeWillSucceed</tabstop>
|
||||
<tabstop>comboCacheError</tabstop>
|
||||
<tabstop>checkNextBugReportWillSucceed</tabstop>
|
||||
</tabstops>
|
||||
<resources/>
|
||||
|
||||
@ -58,7 +58,7 @@ UsersTab::UsersTab(QWidget *parent)
|
||||
connect(ui_.checkSync, &QCheckBox::toggled, this, &UsersTab::onCheckSyncToggled);
|
||||
connect(ui_.sliderSync, &QSlider::valueChanged, this, &UsersTab::onSliderSyncValueChanged);
|
||||
|
||||
users_.append(randomUser());
|
||||
users_.append(defaultUser());
|
||||
|
||||
this->updateGUIState();
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user