From 419a9a520c0665ac23fdbfe6d5895c7f4e0c416b Mon Sep 17 00:00:00 2001 From: hunbernd Date: Sun, 29 Dec 2019 14:19:19 +0100 Subject: [PATCH] Removed redundant title inputbox --- .../src/gui/Posted/PostedCreatePostDialog.cpp | 11 +-- .../src/gui/Posted/PostedCreatePostDialog.ui | 78 +++++++++---------- 2 files changed, 41 insertions(+), 48 deletions(-) diff --git a/retroshare-gui/src/gui/Posted/PostedCreatePostDialog.cpp b/retroshare-gui/src/gui/Posted/PostedCreatePostDialog.cpp index c822bb492..9fd400d3c 100644 --- a/retroshare-gui/src/gui/Posted/PostedCreatePostDialog.cpp +++ b/retroshare-gui/src/gui/Posted/PostedCreatePostDialog.cpp @@ -90,14 +90,7 @@ void PostedCreatePostDialog::createPost() post.mNotes = std::string(text.toUtf8()); post.mMeta.mAuthorId = authorId; - - if(!ui->titleEdit->text().isEmpty()) - { - post.mMeta.mMsgName = std::string(ui->titleEdit->text().toUtf8()); - }else - { - post.mMeta.mMsgName = std::string(ui->titleEditLink->text().toUtf8()); - } + post.mMeta.mMsgName = std::string(ui->titleEdit->text().toUtf8()); QByteArray ba; QBuffer buffer(&ba); @@ -111,7 +104,7 @@ void PostedCreatePostDialog::createPost() post.mImage.copy((uint8_t *) ba.data(), ba.size()); } - if(ui->titleEdit->text().isEmpty()&& ui->titleEditLink->text().isEmpty()) { + if(ui->titleEdit->text().isEmpty()) { /* error message */ QMessageBox::warning(this, "RetroShare", tr("Please add a Title"), QMessageBox::Ok, QMessageBox::Ok); return; //Don't add a empty title!! diff --git a/retroshare-gui/src/gui/Posted/PostedCreatePostDialog.ui b/retroshare-gui/src/gui/Posted/PostedCreatePostDialog.ui index d64c3ad01..dcfa504a2 100644 --- a/retroshare-gui/src/gui/Posted/PostedCreatePostDialog.ui +++ b/retroshare-gui/src/gui/Posted/PostedCreatePostDialog.ui @@ -128,6 +128,22 @@ + + + + Qt::Horizontal + + + QSizePolicy::Expanding + + + + 40 + 20 + + + + @@ -199,7 +215,7 @@ - + @@ -226,23 +242,7 @@ - - - - Qt::Horizontal - - - QSizePolicy::Expanding - - - - 40 - 20 - - - - - + @@ -258,7 +258,7 @@ - + 0 @@ -277,16 +277,9 @@ 0 - + - - - - Title - - - @@ -397,14 +390,14 @@ 0 - + Url - + Qt::Vertical @@ -417,18 +410,11 @@ - - - - Title - - - - + @@ -444,6 +430,22 @@ + + + + + 0 + 0 + + + + Qt::AlignLeading|Qt::AlignLeft|Qt::AlignVCenter + + + Title + + + @@ -475,8 +477,6 @@ - -