Changeset View
Changeset View
Standalone View
Standalone View
src/dcc/resumedialog.cpp
Show First 20 Lines • Show All 65 Lines • ▼ Show 20 Line(s) | 35 | { | |||
---|---|---|---|---|---|
66 | 66 | | |||
67 | delete dlg; | 67 | delete dlg; | ||
68 | 68 | | |||
69 | return ra; | 69 | return ra; | ||
70 | } | 70 | } | ||
71 | 71 | | |||
72 | ResumeDialog::ResumeDialog(TransferRecv* item, const QString& caption, const QString& message, int enabledActions, QFlags<QDialogButtonBox::StandardButton> enabledButtonCodes, | 72 | ResumeDialog::ResumeDialog(TransferRecv* item, const QString& caption, const QString& message, int enabledActions, QFlags<QDialogButtonBox::StandardButton> enabledButtonCodes, | ||
73 | QDialogButtonBox::StandardButton defaultButtonCode) | 73 | QDialogButtonBox::StandardButton defaultButtonCode) | ||
74 | : QDialog(0) | 74 | : QDialog(nullptr) | ||
75 | , m_overwriteDefaultPathCheckBox(0) | 75 | , m_overwriteDefaultPathCheckBox(nullptr) | ||
76 | , m_item(item) | 76 | , m_item(item) | ||
77 | , m_enabledActions(enabledActions) | 77 | , m_enabledActions(enabledActions) | ||
78 | , m_selectedAction(RA_Cancel) | 78 | , m_selectedAction(RA_Cancel) | ||
79 | { | 79 | { | ||
80 | setWindowTitle(caption); | 80 | setWindowTitle(caption); | ||
81 | setModal(true); | 81 | setModal(true); | ||
82 | 82 | | |||
83 | QVBoxLayout *mainLayout = new QVBoxLayout; | 83 | QVBoxLayout *mainLayout = new QVBoxLayout; | ||
▲ Show 20 Lines • Show All 43 Lines • ▼ Show 20 Line(s) | 126 | if (enabledButtonCodes & QDialogButtonBox::Retry) | |||
127 | m_buttonBox->button(QDialogButtonBox::Retry)->setText(i18n("&Resume")); | 127 | m_buttonBox->button(QDialogButtonBox::Retry)->setText(i18n("&Resume")); | ||
128 | mainLayout->addWidget(m_buttonBox); | 128 | mainLayout->addWidget(m_buttonBox); | ||
129 | 129 | | |||
130 | connect(m_buttonBox, &QDialogButtonBox::clicked, this, &ResumeDialog::buttonClicked); | 130 | connect(m_buttonBox, &QDialogButtonBox::clicked, this, &ResumeDialog::buttonClicked); | ||
131 | 131 | | |||
132 | updateDialogButtons(); | 132 | updateDialogButtons(); | ||
133 | } | 133 | } | ||
134 | 134 | | |||
135 | ResumeDialog::~ResumeDialog() | 135 | ResumeDialog::~ResumeDialog() = default; | ||
136 | { | | |||
137 | } | | |||
138 | 136 | | |||
139 | void ResumeDialog::buttonClicked(QAbstractButton* button) | 137 | void ResumeDialog::buttonClicked(QAbstractButton* button) | ||
140 | { | 138 | { | ||
141 | if (m_buttonBox->button(QDialogButtonBox::Ok) == button) | 139 | if (m_buttonBox->button(QDialogButtonBox::Ok) == button) | ||
142 | { | 140 | { | ||
143 | if (m_item->getFileURL() == m_urlreqFileURL->url()) | 141 | if (m_item->getFileURL() == m_urlreqFileURL->url()) | ||
144 | m_selectedAction = RA_Overwrite; | 142 | m_selectedAction = RA_Overwrite; | ||
145 | else | 143 | else | ||
▲ Show 20 Lines • Show All 95 Lines • Show Last 20 Lines |