Merge pull request #2541 from thunder2/warnings

Removed compiler warnings in retroshare-gui
This commit is contained in:
csoler 2022-01-03 19:47:38 +01:00 committed by GitHub
commit 094551b093
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
20 changed files with 18 additions and 21 deletions

View File

@ -830,7 +830,6 @@ void CreateCircleDialog::fillIdentitiesList(const std::vector<RsGxsIdGroup>& id_
bool isSignedByFriendNode = isSigned && rsPeers->isPgpFriend(idGroup.mPgpId); bool isSignedByFriendNode = isSigned && rsPeers->isPgpFriend(idGroup.mPgpId);
/* do filtering */ /* do filtering */
bool ok = false;
if(!(acceptAll ||(acceptOnlySignedIdentities && isSigned) ||(acceptOnlyIdentitiesSignedByFriend && isSignedByFriendNode))) if(!(acceptAll ||(acceptOnlySignedIdentities && isSigned) ||(acceptOnlyIdentitiesSignedByFriend && isSignedByFriendNode)))
{ {

View File

@ -145,7 +145,7 @@ void HomePage::handleEvent(std::shared_ptr<const RsEvent> e)
break; break;
} }
} }
void HomePage::certContextMenu(QPoint point) void HomePage::certContextMenu(QPoint /*point*/)
{ {
QMenu menu(this) ; QMenu menu(this) ;

View File

@ -136,7 +136,7 @@ bool PostedGroupDialog::service_updateGroup(const RsGroupMetaData& editedMeta)
return rsPosted->editBoard(grp); return rsPosted->editBoard(grp);
} }
bool PostedGroupDialog::service_loadGroup(const RsGxsGenericGroupData *data, Mode mode, QString& description) bool PostedGroupDialog::service_loadGroup(const RsGxsGenericGroupData *data, Mode /*mode*/, QString& description)
{ {
const RsPostedGroup *pgroup = dynamic_cast<const RsPostedGroup*>(data); const RsPostedGroup *pgroup = dynamic_cast<const RsPostedGroup*>(data);

View File

@ -130,7 +130,7 @@ bool RSFeedWidget::eventFilter(QObject *object, QEvent *event)
return QWidget::eventFilter(object, event); return QWidget::eventFilter(object, event);
} }
void RSFeedWidget::feedAdded(FeedItem *feedItem, QTreeWidgetItem *treeItem) void RSFeedWidget::feedAdded(FeedItem */*feedItem*/, QTreeWidgetItem */*treeItem*/)
{ {
} }
@ -433,7 +433,6 @@ void RSFeedWidget::feedItemDestroyed(qulonglong id)
QTreeWidgetItem *RSFeedWidget::findTreeWidgetItem(const FeedItem *w) QTreeWidgetItem *RSFeedWidget::findTreeWidgetItem(const FeedItem *w)
{ {
QTreeWidgetItemIterator it(ui->treeWidget); QTreeWidgetItemIterator it(ui->treeWidget);
QTreeWidgetItem *treeItem=NULL;
// this search could probably be automatised by giving the tree items the identifier as data for some specific role, then calling QTreeWidget::findItems() // this search could probably be automatised by giving the tree items the identifier as data for some specific role, then calling QTreeWidget::findItems()
#warning TODO #warning TODO

View File

@ -23,7 +23,7 @@
#include "FeedHolder.h" #include "FeedHolder.h"
/** Constructor */ /** Constructor */
FeedItem::FeedItem(FeedHolder *fh, uint32_t feedId, QWidget *parent) : QWidget(parent), mHash(0),mFeedHolder(fh),mFeedId(feedId) FeedItem::FeedItem(FeedHolder *fh, uint32_t feedId, QWidget *parent) : QWidget(parent),mFeedHolder(fh),mFeedId(feedId),mHash(0)
{ {
mWasExpanded = false; mWasExpanded = false;
} }

View File

@ -487,7 +487,7 @@ void GxsChannelPostItem::fill()
/* subject */ /* subject */
ui->titleLabel->setText(QString::fromUtf8(mPost.mMeta.mMsgName.c_str())); ui->titleLabel->setText(QString::fromUtf8(mPost.mMeta.mMsgName.c_str()));
uint32_t autorized_lines = (int)floor((ui->logoLabel->height() - ui->titleLabel->height() - ui->buttonHLayout->sizeHint().height())/QFontMetricsF(ui->subjectLabel->font()).height()); //uint32_t autorized_lines = (int)floor((ui->logoLabel->height() - ui->titleLabel->height() - ui->buttonHLayout->sizeHint().height())/QFontMetricsF(ui->subjectLabel->font()).height());
// fill first 4 lines of message. (csoler) Disabled the replacement of smileys and links, because the cost is too crazy // fill first 4 lines of message. (csoler) Disabled the replacement of smileys and links, because the cost is too crazy
//ui->subjectLabel->setText(RsHtml().formatText(NULL, RsStringUtil::CopyLines(QString::fromUtf8(mPost.mMsg.c_str()), autorized_lines), RSHTML_FORMATTEXT_EMBED_SMILEYS | RSHTML_FORMATTEXT_EMBED_LINKS)); //ui->subjectLabel->setText(RsHtml().formatText(NULL, RsStringUtil::CopyLines(QString::fromUtf8(mPost.mMsg.c_str()), autorized_lines), RSHTML_FORMATTEXT_EMBED_SMILEYS | RSHTML_FORMATTEXT_EMBED_LINKS));

View File

@ -99,7 +99,6 @@ void GxsCreateCommentDialog::createComment()
return; return;
} }
uint32_t token;
mCommentService->createComment(comment); mCommentService->createComment(comment);
close(); close();
} }

View File

@ -31,7 +31,7 @@
* #define DEBUG_ITEM 1 * #define DEBUG_ITEM 1
**/ **/
GxsGroupFeedItem::GxsGroupFeedItem(FeedHolder *feedHolder, uint32_t feedId, const RsGxsGroupId &groupId, bool isHome, RsGxsIfaceHelper *iface, bool autoUpdate) : GxsGroupFeedItem::GxsGroupFeedItem(FeedHolder *feedHolder, uint32_t feedId, const RsGxsGroupId &groupId, bool isHome, RsGxsIfaceHelper *iface, bool /*autoUpdate*/) :
FeedItem(feedHolder,feedId,NULL) FeedItem(feedHolder,feedId,NULL)
{ {
#ifdef DEBUG_ITEM #ifdef DEBUG_ITEM
@ -102,7 +102,7 @@ void GxsGroupFeedItem::copyGroupLink()
} }
} }
void GxsGroupFeedItem::fillDisplaySlot(bool complete) void GxsGroupFeedItem::fillDisplaySlot(bool /*complete*/)
{ {
requestGroup(); requestGroup();
} }

View File

@ -371,7 +371,7 @@ void GxsMessageFramePostWidget::loadPosts(const std::set<RsGxsMessageId>& msgIds
/**************************************************************/ /**************************************************************/
GxsMessageFramePostThread::GxsMessageFramePostThread(const std::vector<RsGxsGenericMsgData*>& posts,GxsMessageFramePostWidget *parent) GxsMessageFramePostThread::GxsMessageFramePostThread(const std::vector<RsGxsGenericMsgData*>& posts,GxsMessageFramePostWidget *parent)
: mPosts(posts),QThread(parent), mParent(parent) : QThread(parent), mPosts(posts), mParent(parent)
{ {
mStopped = false; mStopped = false;
} }

View File

@ -26,7 +26,7 @@
#define TOKEN_TYPE_STATISTICS 1 #define TOKEN_TYPE_STATISTICS 1
GxsUserNotify::GxsUserNotify(RsGxsIfaceHelper *ifaceImpl, const GxsGroupFrameDialog *g,QObject *parent) : UserNotify(parent), mGroupFrameDialog(g) GxsUserNotify::GxsUserNotify(RsGxsIfaceHelper */*ifaceImpl*/, const GxsGroupFrameDialog *g,QObject *parent) : UserNotify(parent), mGroupFrameDialog(g)
{ {
mNewThreadMessageCount = 0; mNewThreadMessageCount = 0;
mNewChildMessageCount = 0; mNewChildMessageCount = 0;

View File

@ -66,6 +66,7 @@ void GxsChannelDialog::handleEvent_main_thread(std::shared_ptr<const RsEvent> ev
{ {
case RsChannelEventCode::STATISTICS_CHANGED: // [[fallthrough]]; case RsChannelEventCode::STATISTICS_CHANGED: // [[fallthrough]];
updateDisplay(true); // no breaks, on purpose! updateDisplay(true); // no breaks, on purpose!
Q_FALLTHROUGH();
case RsChannelEventCode::NEW_MESSAGE: // [[fallthrough]]; case RsChannelEventCode::NEW_MESSAGE: // [[fallthrough]];
case RsChannelEventCode::UPDATED_MESSAGE: // [[fallthrough]]; case RsChannelEventCode::UPDATED_MESSAGE: // [[fallthrough]];

View File

@ -107,7 +107,7 @@ public:
static const int THUMBNAIL_W = 4; static const int THUMBNAIL_W = 4;
static const int THUMBNAIL_H = 6; static const int THUMBNAIL_H = 6;
static constexpr char *CHAN_DEFAULT_IMAGE = ":images/thumb-default-video.png"; static constexpr const char *CHAN_DEFAULT_IMAGE = ":images/thumb-default-video.png";
virtual ~ChannelPostThumbnailView(); virtual ~ChannelPostThumbnailView();
ChannelPostThumbnailView(QWidget *parent=NULL,uint32_t flags=FLAG_ALLOW_PAN | FLAG_SHOW_TEXT | FLAG_SCALE_FONT); ChannelPostThumbnailView(QWidget *parent=NULL,uint32_t flags=FLAG_ALLOW_PAN | FLAG_SHOW_TEXT | FLAG_SCALE_FONT);

View File

@ -350,7 +350,7 @@
<property name="orientation"> <property name="orientation">
<enum>Qt::Vertical</enum> <enum>Qt::Vertical</enum>
</property> </property>
<widget class="QWidget" name="layoutWidget"> <widget class="QWidget" name="layoutWidget_2">
<layout class="QVBoxLayout" name="verticalLayout"> <layout class="QVBoxLayout" name="verticalLayout">
<item> <item>
<widget class="QFrame" name="toolBarFrame"> <widget class="QFrame" name="toolBarFrame">

View File

@ -477,7 +477,7 @@ void NotifyQt::notifyChatCleared(const ChatId& chat_id)
emit chatCleared(chat_id); emit chatCleared(chat_id);
} }
void NotifyQt::notifyTurtleSearchResult(uint32_t search_id,const std::list<TurtleGxsInfo>& found_groups) void NotifyQt::notifyTurtleSearchResult(uint32_t /*search_id*/,const std::list<TurtleGxsInfo>& /*found_groups*/)
{ {
std::cerr << "(EE) missing code to handle GXS turtle search result." << std::endl; std::cerr << "(EE) missing code to handle GXS turtle search result." << std::endl;
} }

View File

@ -80,7 +80,6 @@ void JsonApiPage::enableJsonApi(bool checked)
bool JsonApiPage::updateParams() bool JsonApiPage::updateParams()
{ {
bool ok = true; bool ok = true;
bool changed = false;
uint16_t port = static_cast<uint16_t>(ui.portSpinBox->value()); uint16_t port = static_cast<uint16_t>(ui.portSpinBox->value());
QString listenAddress = ui.listenAddressLineEdit->text(); QString listenAddress = ui.listenAddressLineEdit->text();

View File

@ -177,7 +177,6 @@ SettingsPage::initStackedWidget()
addPage(new SoundPage() ); // SOUND addPage(new SoundPage() ); // SOUND
addPage(new ServicePermissionsPage() ); // PERMISSIONS addPage(new ServicePermissionsPage() ); // PERMISSIONS
#ifdef RS_JSONAPI #ifdef RS_JSONAPI
JsonApiPage *jsonapi_p = new JsonApiPage() ;
addPage(new JsonApiPage()); addPage(new JsonApiPage());
#ifdef RS_WEBUI #ifdef RS_WEBUI
WebuiPage *webui_p = new WebuiPage() ; WebuiPage *webui_p = new WebuiPage() ;

View File

@ -44,6 +44,7 @@
#include "util/misc.h" #include "util/misc.h"
#include "util/qtthreadsutils.h" #include "util/qtthreadsutils.h"
#ifdef TODO
static QColor colorScale(float f) static QColor colorScale(float f)
{ {
if(f == 0) if(f == 0)
@ -51,6 +52,7 @@ static QColor colorScale(float f)
else else
return QColor::fromHsv((int)((1.0-f)*280),200,255) ; return QColor::fromHsv((int)((1.0-f)*280),200,255) ;
} }
#endif
GxsIdStatistics::GxsIdStatistics(QWidget *parent) GxsIdStatistics::GxsIdStatistics(QWidget *parent)
: RsAutoUpdatePage(4000,parent) : RsAutoUpdatePage(4000,parent)

View File

@ -33,7 +33,7 @@ Histogram::Histogram(double start, double end, int bins)
std::cerr << "Null histogram created! Please check your parameters" << std::endl; std::cerr << "Null histogram created! Please check your parameters" << std::endl;
} }
void Histogram::draw(QPainter *painter) const void Histogram::draw(QPainter */*painter*/) const
{ {
} }

View File

@ -22,7 +22,7 @@
/** Constructor */ /** Constructor */
ClickableLabel::ClickableLabel(QWidget* parent, Qt::WindowFlags f) ClickableLabel::ClickableLabel(QWidget* parent, Qt::WindowFlags f)
: QLabel(parent) { : QLabel(parent, f) {
} }
@ -30,6 +30,6 @@ ClickableLabel::~ClickableLabel() {
} }
void ClickableLabel::mousePressEvent(QMouseEvent* event) { void ClickableLabel::mousePressEvent(QMouseEvent* /*event*/) {
emit clicked(); emit clicked();
} }

View File

@ -21,7 +21,6 @@
#ifdef WIN32 #ifdef WIN32
#define WIN32_LEAN_AND_MEAN
#include <windows.h> #include <windows.h>
#endif #endif