mirror of
https://github.com/RetroShare/RetroShare.git
synced 2024-10-01 02:35:48 -04:00
Fixed some compiler warnings
git-svn-id: http://svn.code.sf.net/p/retroshare/code/trunk@6421 b45a01b8-16f6-495d-af2f-9b41ad6348cc
This commit is contained in:
parent
a6e315db54
commit
27d72c6fba
@ -314,7 +314,7 @@ void ChatLobbyWidget::updateDisplay()
|
||||
updateItem(item, lobby.lobby_id, lobby.lobby_name,lobby.lobby_topic, lobby.total_number_of_peers, subscribed);
|
||||
}
|
||||
|
||||
time_t now = time(NULL) ;
|
||||
// time_t now = time(NULL) ;
|
||||
|
||||
// Now add participating lobbies.
|
||||
//
|
||||
|
@ -28,7 +28,7 @@
|
||||
#include <gui/common/FriendSelectionWidget.h>
|
||||
#include <gui/RetroShareLink.h>
|
||||
|
||||
CreateMsgLinkDialog::CreateMsgLinkDialog(QWidget *parent)
|
||||
CreateMsgLinkDialog::CreateMsgLinkDialog()
|
||||
:QDialog(NULL, Qt::WindowSystemMenuHint | Qt::WindowTitleHint | Qt::WindowMinMaxButtonsHint | Qt::WindowCloseButtonHint)
|
||||
{
|
||||
/* Invoke the Qt Designer generated object setup routine */
|
||||
@ -112,8 +112,10 @@ void CreateMsgLinkDialog::update()
|
||||
{
|
||||
RetroShareLink link ;
|
||||
|
||||
if(!link.createPrivateChatInvite(invites[i].time_of_validity,QString::fromStdString(invites[i].destination_pgp_id),QString::fromStdString(invites[i].encrypted_radix64_string)));
|
||||
if(!link.createPrivateChatInvite(invites[i].time_of_validity,QString::fromStdString(invites[i].destination_pgp_id),QString::fromStdString(invites[i].encrypted_radix64_string))) {
|
||||
std::cerr << "Cannot create link." << std::endl;
|
||||
continue;
|
||||
}
|
||||
|
||||
QListWidgetItem *item = new QListWidgetItem;
|
||||
item->setData(Qt::DisplayRole,tr("Private chat invite to ")+QString::fromStdString(invites[i].destination_pgp_id)) ;
|
||||
|
@ -30,7 +30,7 @@ class CreateMsgLinkDialog : public QDialog, public Ui::CreateMsgLinkDialog
|
||||
Q_OBJECT
|
||||
|
||||
public:
|
||||
CreateMsgLinkDialog(QWidget *parent = NULL);
|
||||
CreateMsgLinkDialog();
|
||||
virtual ~CreateMsgLinkDialog() {}
|
||||
|
||||
private slots:
|
||||
|
@ -259,7 +259,7 @@ void NetworkDialog::removeUnusedKeys()
|
||||
std::cerr << "Skipping public/secret key pair " << *it << std::endl;
|
||||
continue ;
|
||||
}
|
||||
if(now > THREE_MONTHS + details.lastUsed)
|
||||
if(now > (time_t) (THREE_MONTHS + details.lastUsed))
|
||||
{
|
||||
std::cerr << "Adding " << *it << " to pre-selection." << std::endl;
|
||||
pre_selected.push_back(*it) ;
|
||||
|
@ -810,15 +810,12 @@ void NewsFeed::openChat(std::string peerId)
|
||||
ChatDialog::chatFriend(peerId);
|
||||
}
|
||||
|
||||
|
||||
void NewsFeed::openComments(uint32_t type, const RsGxsGroupId &groupId, const RsGxsMessageId &msgId, const QString &title)
|
||||
void NewsFeed::openComments(uint32_t /*type*/, const RsGxsGroupId &/*groupId*/, const RsGxsMessageId &/*msgId*/, const QString &/*title*/)
|
||||
{
|
||||
std::cerr << "NewsFeed::openComments() Not Handled Yet";
|
||||
std::cerr << std::endl;
|
||||
}
|
||||
|
||||
|
||||
|
||||
void NewsFeed::itemDestroyed(QObject *item)
|
||||
{
|
||||
widgets.remove(item);
|
||||
|
@ -1046,6 +1046,8 @@ static void processList(const QStringList &list, const QString &textSingular, co
|
||||
case TYPE_SEARCH:
|
||||
case TYPE_MESSAGE:
|
||||
case TYPE_CERTIFICATE:
|
||||
case TYPE_PRIVATE_CHAT:
|
||||
case TYPE_PUBLIC_MSG:
|
||||
// no need to ask
|
||||
break;
|
||||
|
||||
@ -1275,8 +1277,8 @@ static void processList(const QStringList &list, const QString &textSingular, co
|
||||
QString cleanname = link.name() ;
|
||||
static const QString bad_chars_str = "/\\\"*:?<>|" ;
|
||||
|
||||
for(uint32_t i=0;i<cleanname.length();++i)
|
||||
for(uint32_t j=0;j<bad_chars_str.length();++j)
|
||||
for(int i=0;i<cleanname.length();++i)
|
||||
for(int j=0;j<bad_chars_str.length();++j)
|
||||
if(cleanname[i] == bad_chars_str[j])
|
||||
{
|
||||
cleanname[i] = '_';
|
||||
|
@ -96,7 +96,7 @@ class RetroShareLink
|
||||
const QString& localIPAndPort() const { return _loc_ip_port ; }
|
||||
const QString& externalIPAndPort() const { return _ext_ip_port ; }
|
||||
const QString& location() const { return _location ; }
|
||||
const time_t timeStamp() const { return _time_stamp ; }
|
||||
time_t timeStamp() const { return _time_stamp ; }
|
||||
const QString& encryptedPrivateChatInfo() const { return _encrypted_chat_info ; }
|
||||
QString title() const;
|
||||
|
||||
|
@ -761,6 +761,9 @@ int TransfersDialog::addItem(int row, const FileInfo &fileInfo, const std::map<s
|
||||
break ;
|
||||
case FileChunksInfo::CHUNK_ACTIVE: pinfo.chunks_in_progress.push_back(i);
|
||||
break ;
|
||||
case FileChunksInfo::CHUNK_DONE:
|
||||
case FileChunksInfo::CHUNK_OUTSTANDING:
|
||||
break ;
|
||||
}
|
||||
|
||||
QString tooltip;
|
||||
|
@ -93,7 +93,6 @@ void ChatDialog::init(const std::string &peerId, const QString &title)
|
||||
|
||||
if (cd == NULL) {
|
||||
ChatLobbyId lobby_id = 0;
|
||||
bool distant_peer = false ;
|
||||
|
||||
if (rsMsgs->isLobbyId(peerId, lobby_id)) {
|
||||
chatflags = RS_CHAT_OPEN | RS_CHAT_FOCUS; // use own flags
|
||||
|
@ -12,9 +12,6 @@ std::list<std::string> FriendSelectionDialog::selectFriends(QWidget *parent,cons
|
||||
{
|
||||
FriendSelectionDialog dialog(parent,header_text,modus,show_type,pre_selected_id_type,pre_selected_ids) ;
|
||||
|
||||
dialog.friends_widget->start() ;
|
||||
dialog.friends_widget->setSelectedIds(pre_selected_id_type,pre_selected_ids,true) ;
|
||||
|
||||
dialog.setWindowTitle(caption) ;
|
||||
|
||||
if(QDialog::Rejected == dialog.exec())
|
||||
@ -38,6 +35,8 @@ FriendSelectionDialog::FriendSelectionDialog(QWidget *parent,const QString& head
|
||||
friends_widget->setHeaderText(header_text);
|
||||
friends_widget->setModus(modus) ;
|
||||
friends_widget->setShowType(show_type) ;
|
||||
friends_widget->start() ;
|
||||
friends_widget->setSelectedIds(pre_selected_id_type, pre_selected_ids, false);
|
||||
|
||||
QLayout *l = new QVBoxLayout ;
|
||||
setLayout(l) ;
|
||||
|
@ -63,7 +63,7 @@ static QString purifyFileName(const QString& input,bool& bad)
|
||||
bad = false ;
|
||||
QString output = input ;
|
||||
|
||||
for(uint32_t i=0;i<output.length();++i)
|
||||
for(int i=0;i<output.length();++i)
|
||||
for(int j=0;j<bad_chars.length();++j)
|
||||
if(output[i] == bad_chars[j])
|
||||
{
|
||||
|
@ -45,7 +45,7 @@
|
||||
/** Constructor */
|
||||
SecurityItem::SecurityItem(FeedHolder *parent, uint32_t feedId, const std::string &gpgId, const std::string &sslId, const std::string &sslCn, const std::string& ip_address,uint32_t type, bool isHome)
|
||||
:QWidget(NULL), mParent(parent), mFeedId(feedId),
|
||||
mGpgId(gpgId), mSslId(sslId), mSslCn(sslCn), mType(type), mIsHome(isHome), mIP(ip_address)
|
||||
mGpgId(gpgId), mSslId(sslId), mSslCn(sslCn), mIP(ip_address), mType(type), mIsHome(isHome)
|
||||
{
|
||||
/* Invoke the Qt Designer generated object setup routine */
|
||||
setupUi(this);
|
||||
|
@ -170,7 +170,7 @@ class SignatureEventData
|
||||
free(data) ;
|
||||
}
|
||||
|
||||
bool performSignature()
|
||||
void performSignature()
|
||||
{
|
||||
if(rsPeers->gpgSignData(data,len,sign,signlen))
|
||||
signature_result = 1 ;
|
||||
@ -463,7 +463,8 @@ void NotifyQt::notifyChatLobbyTimeShift(int shift)
|
||||
#endif
|
||||
emit chatLobbyTimeShift(shift) ;
|
||||
}
|
||||
void NotifyQt::handleChatLobbyTimeShift(int shift)
|
||||
|
||||
void NotifyQt::handleChatLobbyTimeShift(int /*shift*/)
|
||||
{
|
||||
static bool already = false ;
|
||||
|
||||
|
@ -369,7 +369,6 @@ behind a firewall or a VPN.</string>
|
||||
<zorder>showDiscStatusBar</zorder>
|
||||
<zorder>allowIpDeterminationCB</zorder>
|
||||
<zorder>IPServersLV</zorder>
|
||||
<zorder></zorder>
|
||||
<zorder>textlabel_ext</zorder>
|
||||
<zorder>textlabel_netLimited</zorder>
|
||||
<zorder>ipAddressList</zorder>
|
||||
@ -563,7 +562,6 @@ The default value is 20.</string>
|
||||
</tabstops>
|
||||
<resources>
|
||||
<include location="../images.qrc"/>
|
||||
<include location="images.qrc"/>
|
||||
</resources>
|
||||
<connections/>
|
||||
</ui>
|
||||
|
@ -755,7 +755,7 @@ bool RshareSettings::getForumOpenAllInNewTab()
|
||||
return valueFromGroup("ForumDialog", "OpenAllInNewTab", true).toBool();
|
||||
}
|
||||
|
||||
bool RshareSettings::setForumOpenAllInNewTab(bool value)
|
||||
void RshareSettings::setForumOpenAllInNewTab(bool value)
|
||||
{
|
||||
setValueToGroup("ForumDialog", "OpenAllInNewTab", value);
|
||||
}
|
||||
|
@ -248,7 +248,7 @@ public:
|
||||
bool getForumExpandNewMessages();
|
||||
void setForumExpandNewMessages(bool value);
|
||||
bool getForumOpenAllInNewTab();
|
||||
bool setForumOpenAllInNewTab(bool value);
|
||||
void setForumOpenAllInNewTab(bool value);
|
||||
|
||||
/* time before idle */
|
||||
uint getMaxTimeBeforeIdle();
|
||||
|
@ -119,6 +119,9 @@ bool RsHtml::canReplaceAnchor(QDomDocument &/*doc*/, QDomElement &/*element*/, c
|
||||
case RetroShareLink::TYPE_CHANNEL:
|
||||
case RetroShareLink::TYPE_SEARCH:
|
||||
case RetroShareLink::TYPE_MESSAGE:
|
||||
case RetroShareLink::TYPE_EXTRAFILE:
|
||||
case RetroShareLink::TYPE_PRIVATE_CHAT:
|
||||
case RetroShareLink::TYPE_PUBLIC_MSG:
|
||||
// not yet implemented
|
||||
break;
|
||||
|
||||
@ -144,6 +147,9 @@ void RsHtml::anchorStylesheetForImg(QDomDocument &/*doc*/, QDomElement &/*elemen
|
||||
case RetroShareLink::TYPE_CHANNEL:
|
||||
case RetroShareLink::TYPE_SEARCH:
|
||||
case RetroShareLink::TYPE_MESSAGE:
|
||||
case RetroShareLink::TYPE_EXTRAFILE:
|
||||
case RetroShareLink::TYPE_PRIVATE_CHAT:
|
||||
case RetroShareLink::TYPE_PUBLIC_MSG:
|
||||
// not yet implemented
|
||||
break;
|
||||
|
||||
@ -698,7 +704,7 @@ void RsHtml::optimizeHtml(QTextEdit *textEdit, QString &text, unsigned int flag)
|
||||
*/
|
||||
void RsHtml::optimizeHtml(QString &text, unsigned int flag, const QColor &backgroundColor, qreal desiredContrast)
|
||||
{
|
||||
int originalLength = text.length();
|
||||
// int originalLength = text.length();
|
||||
|
||||
// remove doctype
|
||||
text.remove(QRegExp("<!DOCTYPE[^>]*>"));
|
||||
|
Loading…
Reference in New Issue
Block a user