mirror of
https://github.com/RetroShare/RetroShare.git
synced 2025-07-31 18:29:02 -04:00
pass over compiler warnings
This commit is contained in:
parent
c2ae4fc904
commit
927f782bef
23 changed files with 66 additions and 73 deletions
|
@ -227,7 +227,7 @@ void xProgressBar::paint()
|
|||
linearGrad.setColorAt(1.00, gradColor1);
|
||||
painter->setPen(gradBorderColor);
|
||||
|
||||
int width = static_cast<int>(rect.width()-1-2*hSpan) ;
|
||||
uint32_t width = static_cast<uint32_t>(rect.width()-1-2*hSpan) ;
|
||||
|
||||
painter->setBrush(linearGrad);
|
||||
|
||||
|
|
|
@ -561,7 +561,7 @@ void IdDialog::loadCircleGroupMeta(const uint32_t &token)
|
|||
// remove any identity that has an item, but no subscription flag entry
|
||||
std::vector<QTreeWidgetItem*> to_delete ;
|
||||
|
||||
for(uint32_t k=0;k<item->childCount();++k)
|
||||
for(int k=0;k<item->childCount();++k)
|
||||
if(details.mSubscriptionFlags.find(RsGxsId(item->child(k)->data(CIRCLEGROUP_CIRCLE_COL_GROUPID,Qt::UserRole).toString().toStdString())) == details.mSubscriptionFlags.end())
|
||||
to_delete.push_back(item->child(k));
|
||||
|
||||
|
|
|
@ -624,8 +624,9 @@ void NewsFeed::loadChannelPublishKey(const uint32_t &token)
|
|||
std::cerr << std::endl;
|
||||
return;
|
||||
}
|
||||
|
||||
#ifdef UNUSED_CODE
|
||||
MessageComposer::sendChannelPublishKey(groups[0]);
|
||||
#endif
|
||||
}
|
||||
|
||||
void NewsFeed::loadForumGroup(const uint32_t &token)
|
||||
|
@ -717,8 +718,9 @@ void NewsFeed::loadForumPublishKey(const uint32_t &token)
|
|||
std::cerr << std::endl;
|
||||
return;
|
||||
}
|
||||
|
||||
#ifdef UNUSED_CODE
|
||||
MessageComposer::sendForumPublishKey(groups[0]);
|
||||
#endif
|
||||
}
|
||||
|
||||
void NewsFeed::loadPostedGroup(const uint32_t &token)
|
||||
|
|
|
@ -295,9 +295,10 @@ void PostedItem::fill()
|
|||
ui->voteDownButton->setEnabled(false);
|
||||
}
|
||||
|
||||
uint32_t up, down, nComments;
|
||||
|
||||
#if 0
|
||||
uint32_t up, down, nComments;
|
||||
|
||||
bool ok = rsPosted->retrieveScores(mPost.mMeta.mServiceString, up, down, nComments);
|
||||
|
||||
if(ok)
|
||||
|
|
|
@ -65,7 +65,7 @@ void AvatarDefs::getAvatarFromSslId(const RsPeerId& sslId, QPixmap &avatar, cons
|
|||
}
|
||||
void AvatarDefs::getAvatarFromGxsId(const RsGxsId& gxsId, QPixmap &avatar, const QString& defaultImage)
|
||||
{
|
||||
int size = 0;
|
||||
//int size = 0;
|
||||
|
||||
/* get avatar */
|
||||
RsIdentityDetails details ;
|
||||
|
|
|
@ -524,7 +524,7 @@ void RSGraphWidget::paintTotals()
|
|||
float FS = QFontMetricsF(font()).height();
|
||||
float fact = FS/14.0 ;
|
||||
|
||||
int x = SCALE_WIDTH*fact + FS, y = 0;
|
||||
//int x = SCALE_WIDTH*fact + FS, y = 0;
|
||||
int rowHeight = FS;
|
||||
|
||||
#if !defined(Q_OS_MAC)
|
||||
|
@ -626,7 +626,7 @@ void RSGraphWidget::wheelEvent(QWheelEvent *e)
|
|||
|
||||
void RSGraphWidget::paintLegend()
|
||||
{
|
||||
int bottom = _rec.height();
|
||||
//int bottom = _rec.height();
|
||||
|
||||
std::vector<QPointF> vals ;
|
||||
_source->getCurrentValues(vals) ;
|
||||
|
|
|
@ -45,6 +45,7 @@ static void fillLabelCallback(GxsIdDetailsType type, const RsIdentityDetails &de
|
|||
case GXS_ID_DETAILS_TYPE_EMPTY:
|
||||
case GXS_ID_DETAILS_TYPE_LOADING:
|
||||
case GXS_ID_DETAILS_TYPE_FAILED:
|
||||
case GXS_ID_DETAILS_TYPE_BANNED:
|
||||
break;
|
||||
|
||||
case GXS_ID_DETAILS_TYPE_DONE:
|
||||
|
|
|
@ -627,6 +627,7 @@ void MessageComposer::sendConnectAttemptMsg(const RsPgpId &gpgId, const RsPeerId
|
|||
rsMail->SystemMessage(title.toUtf8().constData(), msgText.toUtf8().constData(), RS_MSG_USER_REQUEST);
|
||||
}
|
||||
|
||||
#ifdef UNUSED_CODE
|
||||
void MessageComposer::sendChannelPublishKey(RsGxsChannelGroup &group)
|
||||
{
|
||||
// QString channelName = QString::fromUtf8(group.mMeta.mGroupName.c_str());
|
||||
|
@ -658,6 +659,7 @@ void MessageComposer::sendForumPublishKey(RsGxsForumGroup &group)
|
|||
// QString msgText = tr("... %1 ...<br>%2").arg(forumName, link.toHtml());
|
||||
// rsMail->SystemMessage(title.toUtf8().constData(), msgText.toUtf8().constData(), RS_MSG_PUBLISH_KEY);
|
||||
}
|
||||
#endif
|
||||
|
||||
void MessageComposer::closeEvent (QCloseEvent * event)
|
||||
{
|
||||
|
|
|
@ -64,8 +64,10 @@ public:
|
|||
static QString recommendMessage();
|
||||
static void recommendFriend(const std::set <RsPeerId> &sslIds, const RsPeerId &to = RsPeerId(), const QString &msg = "", bool autoSend = false);
|
||||
static void sendConnectAttemptMsg(const RsPgpId &gpgId, const RsPeerId &sslId, const QString &sslName);
|
||||
#ifdef UNUSED_CODE
|
||||
static void sendChannelPublishKey(RsGxsChannelGroup &group);
|
||||
static void sendForumPublishKey(RsGxsForumGroup &group);
|
||||
#endif
|
||||
|
||||
static MessageComposer *newMsg(const std::string &msgId = "");
|
||||
static MessageComposer *replyMsg(const std::string &msgId, bool all);
|
||||
|
|
|
@ -304,7 +304,7 @@ void RSPermissionMatrixWidget::paintEvent(QPaintEvent *)
|
|||
|
||||
_painter->setPen(pen) ;
|
||||
int i=0;
|
||||
int x=5/14.0*S ;
|
||||
//int x=5/14.0*S ;
|
||||
int y=S*fMATRIX_START_Y ;
|
||||
|
||||
for(std::list<RsPeerId>::const_iterator it(ssllist.begin());it!=ssllist.end();++it,++i)
|
||||
|
@ -383,7 +383,7 @@ void RSPermissionMatrixWidget::paintEvent(QPaintEvent *)
|
|||
static const std::string global_switch[2] = { ":/icons/global_switch_off_128.png",
|
||||
":/icons/global_switch_on_128.png" } ;
|
||||
|
||||
for(int i=0;i<service_ids.size();++i)
|
||||
for(uint32_t i=0;i<service_ids.size();++i)
|
||||
{
|
||||
RsServicePermissions serv_perm ;
|
||||
rsServiceControl->getServicePermissions(service_ids[i],serv_perm) ;
|
||||
|
@ -450,7 +450,7 @@ void RSPermissionMatrixWidget::paintEvent(QPaintEvent *)
|
|||
|
||||
// now display some info about current node.
|
||||
|
||||
if(n_row_selected < peer_ids.size() && n_col_selected < service_ids.size())
|
||||
if(n_row_selected < (int)peer_ids.size() && n_col_selected < (int)service_ids.size())
|
||||
{
|
||||
QRect position = computeNodePosition(n_row_selected,n_col_selected,false) ;
|
||||
|
||||
|
@ -592,36 +592,14 @@ bool RSPermissionMatrixWidget::computeServiceGlobalSwitch(int x,int y,uint32_t&
|
|||
return true ;
|
||||
}
|
||||
|
||||
void RSPermissionMatrixWidget::defaultPermissionSwitched(uint32_t ServiceId,bool b)
|
||||
void RSPermissionMatrixWidget::defaultPermissionSwitched(uint32_t /* ServiceId */,bool /* b */)
|
||||
{
|
||||
NOT_IMPLEMENTED ;
|
||||
}
|
||||
|
||||
void RSPermissionMatrixWidget::userPermissionSwitched(uint32_t ServiceId,const RsPeerId& friend_id,bool b)
|
||||
void RSPermissionMatrixWidget::userPermissionSwitched(uint32_t /* ServiceId */,const RsPeerId& /* friend_id */,bool /* b */)
|
||||
{
|
||||
NOT_IMPLEMENTED ;
|
||||
}
|
||||
|
||||
// void RSGraphWidget::paintLegend()
|
||||
// {
|
||||
// int bottom = _rec.height();
|
||||
//
|
||||
// std::vector<float> vals ;
|
||||
// _source->getCurrentValues(vals) ;
|
||||
//
|
||||
// for(uint i=0;i<vals.size();++i)
|
||||
// {
|
||||
// qreal paintStep = 4+FONT_SIZE;
|
||||
// qreal pos = 20+i*paintStep;
|
||||
// QString text = _source->legend(i,vals[i]) ;
|
||||
//
|
||||
// QPen oldPen = _painter->pen();
|
||||
// _painter->setPen(QPen(getColor(i), Qt::SolidLine));
|
||||
// _painter->drawLine(QPointF(SCALE_WIDTH+10.0, pos), QPointF(SCALE_WIDTH+30.0, pos));
|
||||
// _painter->setPen(oldPen);
|
||||
//
|
||||
// _painter->setPen(SCALE_COLOR);
|
||||
// _painter->drawText(QPointF(SCALE_WIDTH + 40,pos + 0.5*FONT_SIZE), text) ;
|
||||
// }
|
||||
// }
|
||||
|
||||
|
|
|
@ -594,7 +594,7 @@ void ServerPage::moveToWhiteList2()
|
|||
|
||||
rsBanList->addIpRange(addr,2,RSBANLIST_TYPE_WHITELIST, tr("Added by you").toStdString());
|
||||
}
|
||||
void ServerPage::ipWhiteListContextMenu(const QPoint& point)
|
||||
void ServerPage::ipWhiteListContextMenu(const QPoint& /* point */)
|
||||
{
|
||||
QMenu contextMenu(this) ;
|
||||
int row = ui.whiteListIpsTable->currentRow();
|
||||
|
|
|
@ -167,7 +167,7 @@ void GlobalRouterStatistics::updateContent()
|
|||
|
||||
groupBox->setTitle(tr("Pending packets")+": " + QString::number(cache_infos.size()) );
|
||||
|
||||
for(int i=0;i<cache_infos.size();++i)
|
||||
for(uint32_t i=0;i<cache_infos.size();++i)
|
||||
{
|
||||
QTreeWidgetItem *item = new QTreeWidgetItem();
|
||||
treeWidget->addTopLevelItem(item);
|
||||
|
|
|
@ -227,8 +227,8 @@ GxsTunnelsDialog::GxsTunnelsDialog(QWidget *parent)
|
|||
|
||||
m_bProcessSettings = false;
|
||||
|
||||
float fontHeight = QFontMetricsF(font()).height();
|
||||
float fact = fontHeight/14.0;
|
||||
//float fontHeight = QFontMetricsF(font()).height();
|
||||
//float fact = fontHeight/14.0;
|
||||
|
||||
maxWidth = 200 ;
|
||||
maxHeight = 200 ;
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue