Remove delete button on form upload to s3 window
This commit is contained in:
@@ -245,19 +245,15 @@ void ImgS3Uploader::onUploadOk() {
|
||||
|
||||
m_copyUrlButton = new QPushButton(tr("Copy URL"));
|
||||
m_openUrlButton = new QPushButton(tr("Open URL"));
|
||||
m_openDeleteUrlButton = new QPushButton(tr("Delete image"));
|
||||
m_toClipboardButton = new QPushButton(tr("Image to Clipboard."));
|
||||
m_hLayout->addWidget(m_copyUrlButton);
|
||||
m_hLayout->addWidget(m_openUrlButton);
|
||||
m_hLayout->addWidget(m_openDeleteUrlButton);
|
||||
m_hLayout->addWidget(m_toClipboardButton);
|
||||
|
||||
connect(m_copyUrlButton, &QPushButton::clicked,
|
||||
this, &ImgS3Uploader::copyURL);
|
||||
connect(m_openUrlButton, &QPushButton::clicked,
|
||||
this, &ImgS3Uploader::openURL);
|
||||
connect(m_openDeleteUrlButton, &QPushButton::clicked,
|
||||
this, &ImgS3Uploader::openDeleteURL);
|
||||
connect(m_toClipboardButton, &QPushButton::clicked,
|
||||
this, &ImgS3Uploader::copyImage);
|
||||
}
|
||||
@@ -274,14 +270,6 @@ void ImgS3Uploader::copyURL() {
|
||||
m_notification->showMessage(tr("URL copied to clipboard."));
|
||||
}
|
||||
|
||||
void ImgS3Uploader::openDeleteURL()
|
||||
{
|
||||
bool successful = QDesktopServices::openUrl(m_deleteImageURL);
|
||||
if (!successful) {
|
||||
m_notification->showMessage(tr("Unable to open the URL."));
|
||||
}
|
||||
}
|
||||
|
||||
void ImgS3Uploader::copyImage() {
|
||||
QApplication::clipboard()->setPixmap(m_pixmap);
|
||||
m_notification->showMessage(tr("Screenshot copied to clipboard."));
|
||||
|
||||
@@ -46,7 +46,6 @@ private slots:
|
||||
|
||||
void openURL();
|
||||
void copyURL();
|
||||
void openDeleteURL();
|
||||
void copyImage();
|
||||
|
||||
private:
|
||||
@@ -68,11 +67,9 @@ private:
|
||||
LoadSpinner *m_spinner;
|
||||
// uploaded
|
||||
QPushButton *m_openUrlButton;
|
||||
QPushButton *m_openDeleteUrlButton;
|
||||
QPushButton *m_copyUrlButton;
|
||||
QPushButton *m_toClipboardButton;
|
||||
QUrl m_imageURL;
|
||||
QUrl m_deleteImageURL;
|
||||
NotificationWidget *m_notification;
|
||||
|
||||
void upload();
|
||||
|
||||
Reference in New Issue
Block a user