Fix Some gcc warnings 383 to 208 lines

Left explicit #warning and deprecated.
Some lines are wrong indented and produce mal formed code.
This commit is contained in:
Phenom 2016-10-22 23:48:19 +02:00
parent 74aa55e347
commit 674b6de381
63 changed files with 379 additions and 346 deletions

View file

@ -253,7 +253,7 @@ void xProgressBar::paint()
//loop through all chunks represented by the pixel at position i and count the completed chunks
//if no incomplete chunk is encountered in this range, continue to count the row of completed chunks
//to see whether more than 1 pixel can be drawn at once.
for(j=first_chunk_in_pixel;((j<=last_chunk_in_pixel) || (all_done && (j<ss)));++j)
for(j=first_chunk_in_pixel;((j<=last_chunk_in_pixel) || (all_done && (j<(int)ss)));++j)
if (_pinfo.cmap[j])
++c;
else

View file

@ -163,12 +163,14 @@ void IdDetailsDialog::insertIdDetails(uint32_t token)
QPixmap pixmap;
if(data.mImage.mSize > 0 && pixmap.loadFromData(data.mImage.mData, data.mImage.mSize, "PNG"))
ui->avatarLabel->setPixmap(pixmap);
else
pixmap = QPixmap::fromImage(GxsIdDetails::makeDefaultIcon(RsGxsId(data.mMeta.mGroupId))) ;
ui->avatarLabel->setPixmap(pixmap); // we need to use the default pixmap here, generated from the ID
if(data.mImage.mSize > 0 && pixmap.loadFromData(data.mImage.mData, data.mImage.mSize, "PNG"))
ui->avatarLabel->setPixmap(pixmap) ;
else
{
pixmap = QPixmap::fromImage(GxsIdDetails::makeDefaultIcon(RsGxsId(data.mMeta.mGroupId)) ) ;
ui->avatarLabel->setPixmap(pixmap) ; // we need to use the default pixmap here, generated from the ID
}
#ifdef ID_DEBUG
std::cerr << "Setting header frame image : " << pix.width() << " x " << pix.height() << std::endl;
#endif

View file

@ -6,8 +6,8 @@
<rect>
<x>0</x>
<y>0</y>
<width>530</width>
<height>518</height>
<width>542</width>
<height>536</height>
</rect>
</property>
<property name="sizePolicy">
@ -20,18 +20,27 @@
<iconset resource="../images.qrc">
<normaloff>:/images/identity/identities_32.png</normaloff>:/images/identity/identities_32.png</iconset>
</property>
<layout class="QVBoxLayout" name="verticalLayout_3">
<layout class="QVBoxLayout" name="IdEditDialogVLayout">
<property name="spacing">
<number>0</number>
</property>
<property name="margin">
<property name="leftMargin">
<number>0</number>
</property>
<property name="topMargin">
<number>0</number>
</property>
<property name="rightMargin">
<number>0</number>
</property>
<property name="bottomMargin">
<number>0</number>
</property>
<item>
<widget class="HeaderFrame" name="headerFrame"/>
</item>
<item>
<widget class="QFrame" name="frame">
<widget class="QFrame" name="frame_Top">
<property name="sizePolicy">
<sizepolicy hsizetype="Expanding" vsizetype="Expanding">
<horstretch>0</horstretch>
@ -44,7 +53,7 @@
<property name="frameShadow">
<enum>QFrame::Raised</enum>
</property>
<layout class="QVBoxLayout" name="verticalLayout_2">
<layout class="QVBoxLayout" name="frame_TopVLayout">
<item>
<widget class="QLabel" name="info_label">
<property name="palette">
@ -129,18 +138,18 @@
</widget>
</item>
<item>
<layout class="QHBoxLayout" name="horizontalLayout">
<layout class="QHBoxLayout" name="frame_TopHLayout">
<item>
<layout class="QGridLayout" name="gridLayout">
<layout class="QGridLayout" name="infoGLayout">
<item row="3" column="0">
<widget class="QLabel" name="label_2">
<widget class="QLabel" name="label_GpgHash">
<property name="text">
<string>PGP Hash</string>
</property>
</widget>
</item>
<item row="0" column="0">
<widget class="QLabel" name="label_5">
<widget class="QLabel" name="label_Type">
<property name="text">
<string>Type</string>
</property>
@ -193,35 +202,35 @@
</widget>
</item>
<item row="1" column="0">
<widget class="QLabel" name="label">
<widget class="QLabel" name="label_Nickname">
<property name="text">
<string>Nickname</string>
</property>
</widget>
</item>
<item row="2" column="0">
<widget class="QLabel" name="label_4">
<widget class="QLabel" name="label_KeyId">
<property name="text">
<string>Key ID</string>
</property>
</widget>
</item>
<item row="4" column="0">
<widget class="QLabel" name="label_6">
<widget class="QLabel" name="label_GpgId">
<property name="text">
<string>PGP Id</string>
</property>
</widget>
</item>
<item row="5" column="0">
<widget class="QLabel" name="label_3">
<widget class="QLabel" name="label_GpgName">
<property name="text">
<string>PGP Name</string>
</property>
</widget>
</item>
<item row="0" column="3">
<spacer name="horizontalSpacer_3">
<spacer name="typeHSpacer">
<property name="orientation">
<enum>Qt::Horizontal</enum>
</property>
@ -265,7 +274,7 @@
</widget>
</item>
<item row="6" column="0" colspan="4">
<spacer name="verticalSpacer_2">
<spacer name="infoVSpacer">
<property name="orientation">
<enum>Qt::Vertical</enum>
</property>
@ -280,7 +289,7 @@
</layout>
</item>
<item>
<layout class="QVBoxLayout" name="verticalLayout">
<layout class="QVBoxLayout" name="avatarVLayout">
<item>
<widget class="QLabel" name="avatarLabel">
<property name="sizePolicy">
@ -326,7 +335,7 @@
</widget>
</item>
<item>
<spacer name="verticalSpacer_3">
<spacer name="avatarVSpacer">
<property name="orientation">
<enum>Qt::Vertical</enum>
</property>
@ -448,7 +457,7 @@
</widget>
</item>
<item row="0" column="0">
<spacer name="verticalSpacer">
<spacer name="vSpacer_Tag">
<property name="orientation">
<enum>Qt::Vertical</enum>
</property>
@ -464,16 +473,25 @@
</widget>
</item>
<item>
<widget class="QFrame" name="frame">
<widget class="QFrame" name="frame_Button">
<layout class="QHBoxLayout" name="horizontalLayout_2">
<property name="spacing">
<number>9</number>
</property>
<property name="margin">
<property name="leftMargin">
<number>9</number>
</property>
<property name="topMargin">
<number>9</number>
</property>
<property name="rightMargin">
<number>9</number>
</property>
<property name="bottomMargin">
<number>9</number>
</property>
<item>
<spacer name="horizontalSpacer">
<spacer name="buttonHSpacer">
<property name="orientation">
<enum>Qt::Horizontal</enum>
</property>

View file

@ -330,11 +330,11 @@ MainWindow::~MainWindow()
void MainWindow::initStackedPage()
{
/* WORK OUT IF WE"RE IN ADVANCED MODE OR NOT */
bool advancedMode = false;
std::string advsetting;
if (rsConfig->getConfigurationOption(RS_CONFIG_ADVANCED, advsetting) && (advsetting == "YES")) {
advancedMode = true;
}
//bool advancedMode = false;
//std::string advsetting;
//if (rsConfig->getConfigurationOption(RS_CONFIG_ADVANCED, advsetting) && (advsetting == "YES")) {
// advancedMode = true;
//}
QList<QPair<MainPage*, QPair<QAction*, QListWidgetItem*> > > notify;

View file

@ -322,7 +322,6 @@
</item>
</layout>
<zorder>titleLabel</zorder>
<zorder></zorder>
</widget>
</item>
<item>

View file

@ -386,10 +386,10 @@ QVariant TreeStyle_RDM::displayRole(const DirDetails& details,int coln) const
if (details.type == DIR_TYPE_PERSON) /* Person */
{
switch(coln)
switch(coln)
{
case 0: {
SharedDirStats stats ;
//SharedDirStats stats ;
QString res ;
if(RemoteMode)
@ -663,13 +663,13 @@ QVariant RetroshareDirModel::data(const QModelIndex &index, int role) const
/* get the data from the index */
void *ref = index.internalPointer();
DirDetails details ;
DirDetails details;
if (!requestDirDetails(ref, RemoteMode,details))
return QVariant();
if(!requestDirDetails(ref, RemoteMode,details))
return QVariant() ;
if (role == RetroshareDirModel::FileNameRole) /* end of FileNameRole */
return QString::fromUtf8(details.name.c_str());
return QString::fromUtf8(details.name.c_str()) ;
if (role == Qt::TextColorRole)
{
@ -1327,7 +1327,7 @@ void RetroshareDirModel::getFilePaths(const QModelIndexList &list, std::list<std
#ifdef RDM_DEBUG
std::cerr << "RetroshareDirModel::getFilePaths()" << std::endl;
#endif
#warning make sure we atually output something here
#warning mr-alice: make sure we atually output something here
if (RemoteMode)
{
#ifdef RDM_DEBUG
@ -1344,7 +1344,7 @@ void RetroshareDirModel::getFilePaths(const QModelIndexList &list, std::list<std
#ifdef RDM_DEBUG
std::cerr << "Constructed FilePath: " << path << std::endl;
#endif
#warning TERRIBLE COST here. Use a std::set!
#warning mr-alice: TERRIBLE COST here. Use a std::set!
if (fullpaths.end() == std::find(fullpaths.begin(), fullpaths.end(), path))
fullpaths.push_back(path);
}

View file

@ -308,10 +308,10 @@ void ShareManager::removeShareDirectory()
{
if ((QMessageBox::question(this, tr("Warning!"),tr("Do you really want to stop sharing this directory ?"),QMessageBox::Yes|QMessageBox::No, QMessageBox::Yes))== QMessageBox::Yes)
{
for(uint32_t i=row;i+1<mDirInfos.size();++i)
mDirInfos[i] = mDirInfos[i+1] ;
for(uint32_t i=row;i+1<mDirInfos.size();++i)
mDirInfos[i] = mDirInfos[i+1] ;
mDirInfos.pop_back() ;
mDirInfos.pop_back() ;
load();
}
}
@ -356,11 +356,8 @@ void ShareManager::showShareDialog()
load();
}
void ShareManager::shareddirListCurrentCellChanged(int currentRow, int currentColumn, int previousRow, int previousColumn)
void ShareManager::shareddirListCurrentCellChanged(int /*currentRow*/, int /*currentColumn*/, int /*previousRow*/, int /*previousColumn*/)
{
Q_UNUSED(currentColumn);
Q_UNUSED(previousRow);
Q_UNUSED(previousColumn);
}
void ShareManager::dragEnterEvent(QDragEnterEvent *event)

View file

@ -693,10 +693,10 @@ static bool caseInsensitiveCompare(QString a, QString b)
void ChatWidget::completeNickname(bool reverse)
{
// Find lobby we belong to
ChatLobbyInfo lobby ;
ChatLobbyInfo lobby;
if(! rsMsgs->getChatLobbyInfo(chatId.toLobbyId(),lobby))
return ;
if (! rsMsgs->getChatLobbyInfo(chatId.toLobbyId(),lobby))
return;
QTextCursor cursor = ui->chatTextEdit->textCursor();
@ -1096,8 +1096,7 @@ void ChatWidget::updateStatusTyping()
void ChatWidget::updateLenOfChatTextEdit()
{
if(sendingBlocked)
return;
if(sendingBlocked) return;
QTextEdit *chatWidget = ui->chatTextEdit;
QString text;

View file

@ -167,7 +167,7 @@ void PopupDistantChatDialog::closeEvent(QCloseEvent *e)
PopupChatDialog::closeEvent(e) ;
}
QString PopupDistantChatDialog::getPeerName(const ChatId &/*id*/) const
QString PopupDistantChatDialog::getPeerName(const ChatId& /*id*/) const
{
DistantChatPeerInfo tinfo;

View file

@ -179,8 +179,8 @@ void AvatarWidget::refreshStatus()
{
uint32_t status = 0;
if(mId.isNotSet())
return ;
if (mId.isNotSet())
return;
if (mFlag.isOwnId)
{

View file

@ -153,7 +153,7 @@ QString GroupFlagsWidget::groupInfoString(FileStorageFlags flags, const QList<QS
else
res += tr("No one can anonymously access/search these files.") ;
return res ;
return res ;
}
void GroupFlagsWidget::update_DL_button(bool b) { update_button_state(b,INDEX_ANON_DL ) ; updated() ; }

View file

@ -98,7 +98,7 @@ GroupSelectionDialog::~GroupSelectionDialog()
{
delete mBox ;
}
GroupSelectionDialog::GroupSelectionDialog(QWidget *parent)
GroupSelectionDialog::GroupSelectionDialog(QWidget* /*parent*/)
{
mBox = new GroupSelectionBox(this) ;

View file

@ -151,10 +151,10 @@ void RSGraphWidget::setShowEntry(uint32_t entry,bool b)
void RSGraphWidget::setSource(RSGraphSource *gs)
{
if(_source != NULL)
delete _source ;
if (_source != NULL)
delete _source;
_source = gs ;
_source = gs;
}
qint64 RSGraphSource::getTime() const

View file

@ -154,8 +154,8 @@ bool RSButtonOnText::eventFilter(QObject *obj, QEvent *event)
}
}
if(!guard)
std::cerr << "BIG FAT WARNING from RSButtonOnText::eventFilter(): i was deleted in my own event handler. This is bad practice. Please make a patch and use deleteLater to delay deletion." << std::endl;
if (!guard)
std::cerr << "BIG FAT WARNING from RSButtonOnText::eventFilter(): i was deleted in my own event handler. This is bad practice. Please make a patch and use deleteLater to delay deletion." << std::endl ;
// pass the event on to the parent class
return QWidget::eventFilter(obj, event);

View file

@ -270,7 +270,7 @@ bool RsCollectionFile::checkFile(const QString& fileName, bool showError)
if(c == '\t' || c == '\n' || c == '\b' || c == '\r')
continue ;
if(n == max_size || file.atEnd())
if (n == max_size || file.atEnd())
for(int i=0;i<n-1;++i)
current[i] = current[i+1] ;

View file

@ -18,15 +18,24 @@
<normaloff>:/images/logo/logo_16.png</normaloff>:/images/logo/logo_16.png</iconset>
</property>
<layout class="QGridLayout" name="gridLayout_5">
<property name="leftMargin">
<number>0</number>
</property>
<property name="topMargin">
<number>0</number>
</property>
<property name="rightMargin">
<number>0</number>
</property>
<property name="bottomMargin">
<number>0</number>
</property>
<property name="horizontalSpacing">
<number>6</number>
</property>
<property name="verticalSpacing">
<number>0</number>
</property>
<property name="margin">
<number>0</number>
</property>
<item row="0" column="0">
<widget class="HeaderFrame" name="headerFrame">
<property name="frameShape">
@ -35,7 +44,6 @@
<property name="frameShadow">
<enum>QFrame::Plain</enum>
</property>
<zorder>stabWidget</zorder>
</widget>
</item>
<item row="1" column="0">

View file

@ -627,6 +627,7 @@ bool ConnectFriendWizard::validateCurrentPage()
switch ((Page) currentId()) {
case Page_Intro:
case Page_WebMail:
break;
case Page_Text:
{

View file

@ -284,8 +284,8 @@ static void convolveWithGaussian(double *forceMap,unsigned int S,int /*s*/)
unsigned long nn[2] = {S,S};
fourn(&forceMap[-1],&nn[-1],2,1) ;
for(unsigned int i=0;i<S;++i)
for(unsigned int j=0;j<S;++j)
for (unsigned int i=0;i<S;++i)
for (unsigned int j=0;j<S;++j)
{
float a = forceMap[2*(i+S*j)]*bf[2*(i+S*j)] - forceMap[2*(i+S*j)+1]*bf[2*(i+S*j)+1] ;
float b = forceMap[2*(i+S*j)]*bf[2*(i+S*j)+1] + forceMap[2*(i+S*j)+1]*bf[2*(i+S*j)] ;

View file

@ -85,12 +85,12 @@ void MsgItem::updateItemStatic()
if (!rsMail->getMessage(mMsgId, mi))
return;
/* get peer Id */
/* get peer Id */
if(mi.msgflags & RS_MSG_SIGNED)
avatar->setGxsId(mi.rsgxsid_srcId);
else
avatar->setId(ChatId(mi.rspeerid_srcId));
if (mi.msgflags & RS_MSG_SIGNED)
avatar->setGxsId(mi.rsgxsid_srcId) ;
else
avatar->setId(ChatId(mi.rspeerid_srcId)) ;
QString title;
QString srcName;

View file

@ -7,10 +7,10 @@
<x>0</x>
<y>0</y>
<width>643</width>
<height>140</height>
<height>146</height>
</rect>
</property>
<layout class="QGridLayout">
<layout class="QGridLayout" name="MsgItemGLayout">
<property name="leftMargin">
<number>1</number>
</property>
@ -104,11 +104,20 @@
<property name="frameShadow">
<enum>QFrame::Sunken</enum>
</property>
<layout class="QGridLayout" name="gridLayout_2">
<layout class="QGridLayout" name="frameGLayout">
<item row="0" column="0">
<widget class="QFrame" name="frame_2">
<layout class="QGridLayout" name="gridLayout">
<property name="margin">
<widget class="QFrame" name="mainFrame">
<layout class="QGridLayout" name="mainFrameGLayout">
<property name="leftMargin">
<number>0</number>
</property>
<property name="topMargin">
<number>0</number>
</property>
<property name="rightMargin">
<number>0</number>
</property>
<property name="bottomMargin">
<number>0</number>
</property>
<item row="0" column="0" rowspan="3">
@ -151,7 +160,7 @@
</widget>
</item>
<item row="0" column="2">
<spacer>
<spacer name="mainFrameHSpacer">
<property name="orientation">
<enum>Qt::Horizontal</enum>
</property>
@ -196,7 +205,7 @@
</widget>
</item>
<item row="2" column="1" colspan="3">
<layout class="QHBoxLayout" name="horizontalLayout">
<layout class="QHBoxLayout" name="buttonHLayout">
<item>
<widget class="QToolButton" name="replyButton">
<property name="focusPolicy">
@ -221,7 +230,7 @@
</widget>
</item>
<item>
<spacer name="horizontalSpacer">
<spacer name="buttonHSpacer">
<property name="orientation">
<enum>Qt::Horizontal</enum>
</property>
@ -320,7 +329,7 @@
</item>
<item row="1" column="0">
<widget class="QFrame" name="expandFrame">
<layout class="QVBoxLayout">
<layout class="QVBoxLayout" name="expandFrameVLayout">
<item>
<widget class="QLabel" name="msgLabel">
<property name="sizePolicy">

View file

@ -45,10 +45,10 @@ CreateGroup::CreateGroup(const RsNodeGroupId &groupId, QWidget *parent)
mGroupId = groupId;
if(!mGroupId.isNull())
ui.groupId_LE->setText(QString::fromStdString(mGroupId.toStdString())) ;
else
ui.groupId_LE->setText(tr("To be defined")) ;
if (!mGroupId.isNull())
ui.groupId_LE->setText(QString::fromStdString(mGroupId.toStdString()));
else
ui.groupId_LE->setText(tr("To be defined"));
/* Initialize friends list */
ui.friendList->setHeaderText(tr("Friends"));

View file

@ -203,22 +203,22 @@ GxsForumThreadWidget::GxsForumThreadWidget(const RsGxsGroupId &forumId, QWidget
setGroupId(forumId);
ui->threadTreeWidget->installEventFilter(this);
ui->threadTreeWidget->installEventFilter(this) ;
ui->postText->clear();
ui->by_label->setId(RsGxsId());
ui->time_label->clear() ;
ui->lineRight->hide() ;
ui->lineLeft->hide() ;
ui->by_text_label->hide() ;
ui->by_label->hide() ;
ui->postText->setImageBlockWidget(ui->imageBlockWidget);
ui->postText->resetImagesStatus(Settings->getForumLoadEmbeddedImages()) ;
ui->postText->clear() ;
ui->by_label->setId(RsGxsId()) ;
ui->time_label->clear();
ui->lineRight->hide();
ui->lineLeft->hide();
ui->by_text_label->hide();
ui->by_label->hide();
ui->postText->setImageBlockWidget(ui->imageBlockWidget) ;
ui->postText->resetImagesStatus(Settings->getForumLoadEmbeddedImages());
ui->subscribeToolButton->setToolTip(tr("<p>Subscribing to the forum will gather \
available posts from your subscribed friends, and make the \
forum visible to all other friends.</p><p>Afterwards you can unsubscribe from the context menu of the forum list at left.</p>"));
ui->threadTreeWidget->enableColumnCustomize(true);
ui->subscribeToolButton->setToolTip(tr( "<p>Subscribing to the forum will gather \
available posts from your subscribed friends, and make the \
forum visible to all other friends.</p><p>Afterwards you can unsubscribe from the context menu of the forum list at left.</p>"));
ui->threadTreeWidget->enableColumnCustomize(true);
}
GxsForumThreadWidget::~GxsForumThreadWidget()
@ -1379,12 +1379,12 @@ void GxsForumThreadWidget::insertMessage()
/* blank text, incase we get nothing */
ui->postText->clear();
ui->by_label->setId(RsGxsId());
ui->time_label->clear() ;
ui->lineRight->hide() ;
ui->lineLeft->hide() ;
ui->by_text_label->hide() ;
ui->by_label->hide() ;
ui->by_label->setId(RsGxsId()) ;
ui->time_label->clear();
ui->lineRight->hide();
ui->lineLeft->hide();
ui->by_text_label->hide();
ui->by_label->hide();
/* request Post */
RsGxsGrpMsgIdPair msgId = std::make_pair(groupId(), mThreadId);
@ -1441,28 +1441,27 @@ void GxsForumThreadWidget::insertMessageData(const RsGxsForumMsg &msg)
}
ui->time_label->setText(DateTime::formatLongDateTime(msg.mMeta.mPublishTs));
ui->by_label->setId(msg.mMeta.mAuthorId) ;
ui->by_label->setId(msg.mMeta.mAuthorId);
ui->lineRight->show();
ui->lineLeft->show();
ui->by_text_label->show();
ui->by_label->show();
ui->lineRight->show() ;
ui->lineLeft->show() ;
ui->by_text_label->show() ;
ui->by_label->show() ;
if(redacted)
{
QString extraTxt = tr( "<p><font color=\"#ff0000\"><b>The author of this message (with ID %1) is banned.</b>").arg(QString::fromStdString(msg.mMeta.mAuthorId.toStdString())) ;
extraTxt += tr( "<UL><li><b><font color=\"#ff0000\">Messages from this author are not forwarded. </font></b></li>") ;
extraTxt += tr( "<li><b><font color=\"#ff0000\">Messages from this author are replaced by this text. </font></b></li></ul>") ;
extraTxt += tr( "<p><b><font color=\"#ff0000\">You can force the visibility and forwarding of messages by setting a different opinion for that Id in People's tab.</font></b></p>") ;
if(redacted)
{
QString extraTxt = tr("<p><font color=\"#ff0000\"><b>The author of this message (with ID %1) is banned.</b>").arg(QString::fromStdString(msg.mMeta.mAuthorId.toStdString())) ;
extraTxt += tr("<UL><li><b><font color=\"#ff0000\">Messages from this author are not forwarded. </font></b></li>") ;
extraTxt += tr("<li><b><font color=\"#ff0000\">Messages from this author are replaced by this text. </font></b></li></ul>") ;
extraTxt += tr("<p><b><font color=\"#ff0000\">You can force the visibility and forwarding of messages by setting a different opinion for that Id in People's tab.</font></b></p>") ;
ui->postText->setHtml(extraTxt);
}
else
{
QString extraTxt = RsHtml().formatText(ui->postText->document(), QString::fromUtf8(msg.mMsg.c_str()), RSHTML_FORMATTEXT_EMBED_SMILEYS | RSHTML_FORMATTEXT_EMBED_LINKS);
ui->postText->setHtml(extraTxt);
}
//ui->threadTitle->setText(QString::fromUtf8(msg.mMeta.mMsgName.c_str()));
ui->postText->setHtml(extraTxt) ;
}
else
{
QString extraTxt = RsHtml().formatText(ui->postText->document(), QString::fromUtf8(msg.mMsg.c_str()), RSHTML_FORMATTEXT_EMBED_SMILEYS | RSHTML_FORMATTEXT_EMBED_LINKS);
ui->postText->setHtml(extraTxt);
}
// ui->threadTitle->setText(QString::fromUtf8(msg.mMeta.mMsgName.c_str()));
}
void GxsForumThreadWidget::previousMessage()

View file

@ -413,8 +413,8 @@ void MessageComposer::processSettings(bool bLoad)
ui.contactsdockWidget->setVisible(Settings->value("ContactSidebar", true).toBool());
// state of splitter
ui.splitter->restoreState(Settings->value("Splitter").toByteArray());
ui.splitter_2->restoreState(Settings->value("Splitter2").toByteArray());
ui.messageSplitter->restoreState(Settings->value("Splitter").toByteArray());
ui.centralwidgetHSplitter->restoreState(Settings->value("Splitter2").toByteArray());
// state of filter combobox
int index = Settings->value("ShowType", 0).toInt();
@ -431,8 +431,8 @@ void MessageComposer::processSettings(bool bLoad)
Settings->setValue("ContactSidebar", ui.contactsdockWidget->isVisible());
// state of splitter
Settings->setValue("Splitter", ui.splitter->saveState());
Settings->setValue("Splitter2", ui.splitter_2->saveState());
Settings->setValue("Splitter", ui.messageSplitter->saveState());
Settings->setValue("Splitter2", ui.centralwidgetHSplitter->saveState());
// state of filter combobox
Settings->setValue("ShowType", ui.filterComboBox->currentIndex());
@ -887,7 +887,7 @@ void MessageComposer::calculateTitle()
setWindowTitle(tr("Compose") + ": " + misc::removeNewLine(ui.titleEdit->text()));
}
static void calculateGroupsOfSslIds(const std::list<RsGroupInfo> &existingGroupInfos, std::list<RsPeerId> &checkSslIds, std::list<RsNodeGroupId> &checkGroupIds)
/*static void calculateGroupsOfSslIds(const std::list<RsGroupInfo> &existingGroupInfos, std::list<RsPeerId> &checkSslIds, std::list<RsNodeGroupId> &checkGroupIds)
{
checkGroupIds.clear();
@ -973,6 +973,7 @@ static void calculateGroupsOfSslIds(const std::list<RsGroupInfo> &existingGroupI
checkGroupIds.push_back(groupInfoIt->id);
}
}
*/
MessageComposer *MessageComposer::newMsg(const std::string &msgId /* = ""*/)
{
@ -2634,10 +2635,11 @@ void MessageComposer::addRecommend()
if (sslIds.empty() && gxsIds.empty())
return;
for(std::set <RsPeerId>::iterator it = sslIds.begin(); it != sslIds.end(); ++it)
addRecipient(CC, *it);
for (std::set<RsGxsId>::const_iterator it = gxsIds.begin(); it != gxsIds.end(); ++it)
addRecipient(TO, *it);
for( std::set <RsPeerId>::iterator it = sslIds.begin(); it != sslIds.end(); ++it)
addRecipient(CC, *it) ;
for( std::set<RsGxsId>::const_iterator it = gxsIds.begin(); it != gxsIds.end(); ++it)
addRecipient(TO, *it) ;
QString text = buildRecommendHtml(sslIds);
ui.msgText->textCursor().insertHtml(text);

View file

@ -6,8 +6,8 @@
<rect>
<x>0</x>
<y>0</y>
<width>935</width>
<height>706</height>
<width>936</width>
<height>714</height>
</rect>
</property>
<property name="windowTitle">
@ -18,9 +18,9 @@
<normaloff>:/images/folder-draft.png</normaloff>:/images/folder-draft.png</iconset>
</property>
<widget class="QWidget" name="centralwidget">
<layout class="QGridLayout" name="gridLayout_3">
<layout class="QGridLayout" name="centralwidgetGLayout">
<item row="0" column="0">
<widget class="QSplitter" name="splitter_2">
<widget class="QSplitter" name="centralwidgetHSplitter">
<property name="orientation">
<enum>Qt::Horizontal</enum>
</property>
@ -59,7 +59,7 @@
<string>Address list:</string>
</property>
<widget class="QWidget" name="dockWidgetContents">
<layout class="QVBoxLayout" name="verticalLayout">
<layout class="QVBoxLayout" name="dockWidgetContentsVLayout">
<property name="leftMargin">
<number>0</number>
</property>
@ -110,9 +110,9 @@
</widget>
</item>
<item>
<layout class="QVBoxLayout" name="verticalLayout_4">
<layout class="QVBoxLayout" name="addButtonVLayout">
<item>
<layout class="QHBoxLayout" name="horizontalLayout_2">
<layout class="QHBoxLayout" name="addButtonHLayout">
<item>
<widget class="QPushButton" name="addCcButton">
<property name="sizePolicy">
@ -155,7 +155,7 @@
</layout>
</item>
<item>
<layout class="QHBoxLayout" name="horizontalLayout_3">
<layout class="QHBoxLayout" name="recommendHLayout">
<item>
<widget class="QPushButton" name="addRecommendButton">
<property name="sizePolicy">
@ -176,12 +176,12 @@
</layout>
</widget>
</widget>
<widget class="QSplitter" name="splitter">
<widget class="QSplitter" name="messageSplitter">
<property name="orientation">
<enum>Qt::Vertical</enum>
</property>
<widget class="QWidget" name="layoutWidget">
<layout class="QGridLayout" name="gridLayout_2">
<layout class="QGridLayout" name="messageGLayout">
<property name="verticalSpacing">
<number>2</number>
</property>
@ -199,7 +199,7 @@
<property name="frameShadow">
<enum>QFrame::Sunken</enum>
</property>
<layout class="QGridLayout" name="gridLayout_5">
<layout class="QGridLayout" name="toolBarFrameGLayout">
<property name="leftMargin">
<number>6</number>
</property>
@ -213,7 +213,7 @@
<number>6</number>
</property>
<item row="0" column="0">
<layout class="QGridLayout">
<layout class="QGridLayout" name="toolButtonGLayout">
<property name="horizontalSpacing">
<number>1</number>
</property>
@ -789,7 +789,7 @@
<property name="frameShape">
<enum>QFrame::Box</enum>
</property>
<layout class="QHBoxLayout" name="horizontalLayout_4">
<layout class="QHBoxLayout" name="distantFrameHLayout">
<property name="leftMargin">
<number>6</number>
</property>
@ -866,9 +866,9 @@ border-image: url(:/images/closepressed.png)
</widget>
</item>
<item row="2" column="0">
<layout class="QGridLayout" name="gridLayout">
<layout class="QGridLayout" name="messageTitleGLayout">
<item row="3" column="1">
<layout class="QHBoxLayout" name="horizontalLayout_6">
<layout class="QHBoxLayout" name="tagHLayout">
<item>
<widget class="QPushButton" name="tagButton">
<property name="sizePolicy">
@ -1120,8 +1120,8 @@ border-image: url(:/images/closepressed.png)
<rect>
<x>0</x>
<y>0</y>
<width>935</width>
<height>21</height>
<width>936</width>
<height>19</height>
</rect>
</property>
</widget>
@ -1237,17 +1237,17 @@ border-image: url(:/images/closepressed.png)
<extends>QTextEdit</extends>
<header location="global">gui/common/MimeTextEdit.h</header>
</customwidget>
<customwidget>
<class>GxsIdChooser</class>
<extends>QComboBox</extends>
<header>gui/gxs/GxsIdChooser.h</header>
</customwidget>
<customwidget>
<class>FriendSelectionWidget</class>
<extends>QWidget</extends>
<header>gui/common/FriendSelectionWidget.h</header>
<container>1</container>
</customwidget>
<customwidget>
<class>GxsIdChooser</class>
<extends>QComboBox</extends>
<header>gui/gxs/GxsIdChooser.h</header>
</customwidget>
</customwidgets>
<tabstops>
<tabstop>titleEdit</tabstop>
@ -1261,8 +1261,8 @@ border-image: url(:/images/closepressed.png)
<tabstop>hashBox</tabstop>
</tabstops>
<resources>
<include location="../images.qrc"/>
<include location="../emojione.qrc"/>
<include location="../images.qrc"/>
</resources>
<connections/>
</ui>

View file

@ -42,7 +42,7 @@ public:
//! if (onlyEdit == true), user woll not be able to change file type,
//! only command (used for editing existing commands)
AddFileAssociationDialog( bool onlyEdit = false, QWidget *parent = 0 ) ;
virtual ~AddFileAssociationDialog(){};
virtual ~AddFileAssociationDialog(){}
void setFileType(QString ft);
void setCommand(QString cmd);

View file

@ -326,7 +326,7 @@ FileAssociationsPage::addNewItemToTable(int row, int column,
void
FileAssociationsPage::testButtonClicked()
{
AddFileAssociationDialog afad(this);// = new AddFileAssotiationDialog();
AddFileAssociationDialog afad(true, this);// = new AddFileAssotiationDialog();
// commented code below is a test for
// AddFileAssotiationDialog::loadSystemDefaultCommand(QString ft) method

View file

@ -103,13 +103,12 @@ void RSPermissionMatrixWidget::mousePressEvent(QMouseEvent *e)
{
std::cerr << "Peer id: " << peer_id << ", service: " << service_id << std::endl;
// make sure the service is not globally disabled
// Make sure the service is not globally disabled
RsServicePermissions serv_perms ;
rsServiceControl->getServicePermissions(service_id,serv_perms) ;
RsServicePermissions serv_perms;
rsServiceControl->getServicePermissions(service_id,serv_perms);
if(!serv_perms.mDefaultAllowed)
return ;
if (!serv_perms.mDefaultAllowed) return;
switchPermission(service_id,peer_id) ;
update() ;
@ -335,7 +334,7 @@ void RSPermissionMatrixWidget::paintEvent(QPaintEvent *)
int X = matrix_start_x + S*fCOL_SIZE/2 - 2 + i*S*fCOL_SIZE - text_width/2;
int height_index = 0 ;
while(last_width[height_index] > X-5 && height_index < last_width.size()-1)
while(last_width[height_index] > X-5 && height_index < ((int)last_width.size()-1) )
++height_index ;
int Y = S*fMATRIX_START_Y - S*fICON_SIZE_Y - 2 - line_height * height_index;

View file

@ -231,7 +231,7 @@ void ServerPage::load()
ui.iconlabel_upnp->show();
ui.label_nat->show();
ui.hiddenMode_LB->hide() ;
ui.textlabel_hiddenMode->hide() ;
ui.iconlabel_hiddenMode->hide() ;
/* set net mode */
@ -888,7 +888,7 @@ void ServerPage::loadHiddenNode()
ui.iconlabel_upnp->hide();
ui.label_nat->hide();
ui.hiddenMode_LB->show();
ui.textlabel_hiddenMode->show();
ui.iconlabel_hiddenMode->show() ;
ui.iconlabel_hiddenMode->setPixmap(QPixmap(":/images/ledon1.png"));

View file

@ -10,7 +10,7 @@
<height>568</height>
</rect>
</property>
<layout class="QVBoxLayout" name="verticalLayout_3">
<layout class="QVBoxLayout" name="ServerPageVLayout">
<property name="leftMargin">
<number>6</number>
</property>
@ -26,15 +26,15 @@
<item>
<widget class="QTabWidget" name="tabWidget">
<property name="currentIndex">
<number>0</number>
<number>2</number>
</property>
<widget class="QWidget" name="tab">
<widget class="QWidget" name="tabNetConf">
<attribute name="title">
<string>Network Configuration</string>
</attribute>
<layout class="QGridLayout" name="gridLayout_3">
<layout class="QGridLayout" name="tabNetConfGLayout">
<item row="0" column="0">
<layout class="QHBoxLayout" name="horizontalLayout_3">
<layout class="QHBoxLayout" name="netConfHLayout">
<item>
<layout class="QHBoxLayout">
<property name="spacing">
@ -63,7 +63,7 @@
</widget>
</item>
<item>
<widget class="QLabel" name="label">
<widget class="QLabel" name="label_localAddress">
<property name="text">
<string>Local Address</string>
</property>
@ -84,7 +84,7 @@
</widget>
</item>
<item>
<widget class="QLabel" name="label_14">
<widget class="QLabel" name="label_totalDownloadRate">
<property name="font">
<font>
<weight>50</weight>
@ -97,7 +97,7 @@
</widget>
</item>
<item>
<widget class="QLabel" name="label_15">
<widget class="QLabel" name="label_totalUploadRate">
<property name="font">
<font>
<weight>50</weight>
@ -145,7 +145,7 @@
<widget class="QLineEdit" name="localAddress"/>
</item>
<item row="2" column="1">
<widget class="QLabel" name="label_5">
<widget class="QLabel" name="localPortLabel">
<property name="text">
<string>Port:</string>
</property>
@ -171,7 +171,7 @@
<widget class="QLineEdit" name="extAddress"/>
</item>
<item row="3" column="1">
<widget class="QLabel" name="label_4">
<widget class="QLabel" name="extPortLabel">
<property name="text">
<string>Port:</string>
</property>
@ -249,7 +249,7 @@
</widget>
</item>
<item row="3" column="3">
<layout class="QGridLayout" name="_6">
<layout class="QGridLayout" name="gLayout_ext">
<property name="leftMargin">
<number>6</number>
</property>
@ -285,7 +285,7 @@
</layout>
</item>
<item row="2" column="3">
<layout class="QGridLayout" name="_4">
<layout class="QGridLayout" name="gLayout_netLimited">
<property name="leftMargin">
<number>6</number>
</property>
@ -346,7 +346,7 @@
</widget>
</item>
<item row="1" column="3">
<layout class="QGridLayout" name="_5">
<layout class="QGridLayout" name="gLayout_upnp">
<property name="leftMargin">
<number>6</number>
</property>
@ -379,7 +379,7 @@
</layout>
</item>
<item row="0" column="3">
<layout class="QGridLayout" name="_7">
<layout class="QGridLayout" name="gLayout_hiddenMode">
<property name="leftMargin">
<number>6</number>
</property>
@ -403,7 +403,7 @@
</widget>
</item>
<item row="0" column="1">
<widget class="QLabel" name="hiddenMode_LB">
<widget class="QLabel" name="textlabel_hiddenMode">
<property name="font">
<font>
<weight>75</weight>
@ -427,16 +427,16 @@
</layout>
</item>
<item row="1" column="0">
<layout class="QHBoxLayout" name="horizontalLayout_7">
<layout class="QHBoxLayout" name="ipAddressHLayout">
<item>
<widget class="QLabel" name="label_7">
<widget class="QLabel" name="ipAddressLabel">
<property name="text">
<string>Known / Previous IPs:</string>
</property>
</widget>
</item>
<item>
<spacer name="horizontalSpacer">
<spacer name="ipAddressHSpacer">
<property name="orientation">
<enum>Qt::Horizontal</enum>
</property>
@ -511,13 +511,12 @@ behind a firewall or a VPN.</string>
<zorder>allowIpDeterminationCB</zorder>
<zorder>IPServersLV</zorder>
<zorder>ipAddressList</zorder>
<zorder></zorder>
</widget>
<widget class="QWidget" name="tab_2">
<widget class="QWidget" name="tabIPFilters">
<attribute name="title">
<string>IP Filters</string>
</attribute>
<layout class="QVBoxLayout" name="verticalLayout_11">
<layout class="QVBoxLayout" name="tabIPFiltersVLayout">
<item>
<widget class="QCheckBox" name="denyAll_CB">
<property name="text">
@ -526,7 +525,7 @@ behind a firewall or a VPN.</string>
</widget>
</item>
<item>
<widget class="QTabWidget" name="tabWidget">
<widget class="QTabWidget" name="ipTabWidget">
<property name="currentIndex">
<number>0</number>
</property>
@ -701,13 +700,13 @@ behind a firewall or a VPN.</string>
</widget>
</item>
<item>
<widget class="QGroupBox" name="groupBox_3">
<widget class="QGroupBox" name="manualInputGBox">
<property name="title">
<string>Manual input</string>
</property>
<layout class="QVBoxLayout" name="verticalLayout_10">
<layout class="QVBoxLayout" name="manualInputGBoxVLayout">
<item>
<layout class="QHBoxLayout" name="horizontalLayout_10">
<layout class="QHBoxLayout" name="ipinputHLayout">
<item>
<widget class="QLineEdit" name="ipInput_LE">
<property name="sizePolicy">
@ -771,23 +770,23 @@ behind a firewall or a VPN.</string>
</item>
</layout>
</widget>
<widget class="QWidget" name="HiddenTAB">
<widget class="QWidget" name="tabHiddenConf">
<attribute name="title">
<string>Hidden Service Configuration</string>
</attribute>
<layout class="QVBoxLayout" name="verticalLayout_8">
<layout class="QVBoxLayout" name="tabHiddenConfVLayout">
<item>
<widget class="QGroupBox" name="torpage_outgoing">
<widget class="QGroupBox" name="hiddenpage_outgoing">
<property name="title">
<string>Outgoing Connections</string>
</property>
<layout class="QVBoxLayout" name="verticalLayout_5">
<layout class="QVBoxLayout" name="hiddenpage_outgoingVLayout">
<item>
<layout class="QHBoxLayout" name="horizontalLayout_8">
<layout class="QHBoxLayout" name="torSocksHLayout">
<item>
<layout class="QHBoxLayout" name="horizontalLayout_4">
<layout class="QHBoxLayout" name="hiddenpage_proxyHLayout_tor">
<item>
<widget class="QLabel" name="label_3">
<widget class="QLabel" name="hiddenpage_proxyLabel_tor">
<property name="text">
<string>Tor Socks Proxy</string>
</property>
@ -812,7 +811,7 @@ behind a firewall or a VPN.</string>
</layout>
</item>
<item>
<layout class="QHBoxLayout" name="horizontalLayout_5">
<layout class="QHBoxLayout" name="hiddenpage_proxyOKHLayout_tor">
<item>
<widget class="QLabel" name="iconlabel_tor_outgoing">
<property name="maximumSize">
@ -830,7 +829,7 @@ behind a firewall or a VPN.</string>
</widget>
</item>
<item>
<widget class="QLabel" name="label_9">
<widget class="QLabel" name="label_tor_outgoing">
<property name="toolTip">
<string>&lt;html&gt;&lt;head/&gt;&lt;body&gt;&lt;p&gt;This led is green when the port listen on the left is active on your computer. It does not&lt;/p&gt;&lt;p&gt;mean that your Retroshare traffic transits though Tor. It will do so only if &lt;/p&gt;&lt;p&gt;you connect to Hidden nodes, or if you are running a Hidden node yourself.&lt;/p&gt;&lt;/body&gt;&lt;/html&gt;</string>
</property>
@ -844,7 +843,7 @@ behind a firewall or a VPN.</string>
</layout>
</item>
<item>
<layout class="QHBoxLayout" name="horizontalLayout_15">
<layout class="QHBoxLayout" name="i2pHLayout">
<property name="topMargin">
<number>0</number>
</property>
@ -852,9 +851,9 @@ behind a firewall or a VPN.</string>
<number>0</number>
</property>
<item>
<layout class="QHBoxLayout" name="horizontalLayout_17">
<layout class="QHBoxLayout" name="hiddenpage_proxyHLayout_i2p">
<item>
<widget class="QLabel" name="label_6">
<widget class="QLabel" name="hiddenpage_proxyLabel_i2p">
<property name="text">
<string>I2P Socks Proxy</string>
</property>
@ -879,7 +878,7 @@ behind a firewall or a VPN.</string>
</layout>
</item>
<item>
<layout class="QHBoxLayout" name="horizontalLayout_18">
<layout class="QHBoxLayout" name="hiddenpage_proxyOKHLayout_i2p">
<item>
<widget class="QLabel" name="iconlabel_i2p_outgoing">
<property name="text">
@ -891,7 +890,7 @@ behind a firewall or a VPN.</string>
</widget>
</item>
<item>
<widget class="QLabel" name="label_2">
<widget class="QLabel" name="label_i2p_outgoing">
<property name="toolTip">
<string>&lt;html&gt;&lt;head/&gt;&lt;body&gt;&lt;p&gt;This led is green when the port listen on the left is active on your computer. It does not&lt;/p&gt;&lt;p&gt;mean that your Retroshare traffic transits though I2P. It will do so only if &lt;/p&gt;&lt;p&gt;you connect to Hidden nodes, or if you are running a Hidden node yourself.&lt;/p&gt;&lt;/body&gt;&lt;/html&gt;</string>
</property>
@ -905,7 +904,7 @@ behind a firewall or a VPN.</string>
</layout>
</item>
<item>
<widget class="QPlainTextEdit" name="plainTextEdit">
<widget class="QPlainTextEdit" name="hiddenpageOutHelpPlainTextEdit">
<property name="maximumSize">
<size>
<width>16777215</width>
@ -943,9 +942,9 @@ You can connect to Hidden Nodes, even if you are running a standard Node, so why
<property name="title">
<string>Incoming Service Connections</string>
</property>
<layout class="QVBoxLayout" name="verticalLayout_7">
<layout class="QVBoxLayout" name="hiddenpage_incomingVLayout">
<item>
<layout class="QGridLayout" name="gridLayout">
<layout class="QGridLayout" name="incomingAddressGLayout">
<item row="0" column="2">
<widget class="QSpinBox" name="hiddenpage_localPort">
<property name="minimum">
@ -957,7 +956,7 @@ You can connect to Hidden Nodes, even if you are running a standard Node, so why
</widget>
</item>
<item row="0" column="3">
<layout class="QHBoxLayout" name="horizontalLayout_9">
<layout class="QHBoxLayout" name="testIncomingHLayout">
<item>
<widget class="QPushButton" name="testIncoming_PB">
<property name="toolTip">
@ -988,7 +987,7 @@ You can connect to Hidden Nodes, even if you are running a standard Node, so why
</widget>
</item>
<item row="0" column="0">
<widget class="QLabel" name="label_10">
<widget class="QLabel" name="l_localAddress">
<property name="text">
<string>Local Address</string>
</property>
@ -1009,7 +1008,7 @@ You can connect to Hidden Nodes, even if you are running a standard Node, so why
</widget>
</item>
<item row="1" column="3">
<layout class="QHBoxLayout" name="horizontalLayout">
<layout class="QHBoxLayout" name="incomingTestResultHLayout">
<item>
<widget class="QLabel" name="iconlabel_service_incoming">
<property name="maximumSize">
@ -1041,9 +1040,9 @@ You can connect to Hidden Nodes, even if you are running a standard Node, so why
</layout>
</item>
<item>
<layout class="QVBoxLayout" name="verticalLayout_6">
<layout class="QVBoxLayout" name="hiddenpage_configurationVLayout">
<item>
<widget class="QLabel" name="label_12">
<widget class="QLabel" name="l_hiddenpage_configuration">
<property name="text">
<string>Expected Configuration:</string>
</property>
@ -1083,7 +1082,7 @@ You can connect to Hidden Nodes, even if you are running a standard Node, so why
</layout>
</item>
<item>
<widget class="QPlainTextEdit" name="plainTextEdit_2">
<widget class="QPlainTextEdit" name="hiddenpageInHelpPlainTextEdit">
<property name="sizePolicy">
<sizepolicy hsizetype="Expanding" vsizetype="Expanding">
<horstretch>0</horstretch>
@ -1117,7 +1116,7 @@ If you have issues connecting over Tor check the Tor logs too.</string>
</widget>
</item>
<item>
<spacer name="verticalSpacer_2">
<spacer name="mainVSpacer">
<property name="orientation">
<enum>Qt::Vertical</enum>
</property>