mirror of
https://github.com/RetroShare/RetroShare.git
synced 2025-07-24 15:05:35 -04:00
added warning about random FT strategy on windows
This commit is contained in:
parent
438489fb01
commit
c278239f97
3 changed files with 17 additions and 4 deletions
|
@ -2244,6 +2244,10 @@ void TransfersDialog::chunkStreaming()
|
||||||
}
|
}
|
||||||
void TransfersDialog::chunkRandom()
|
void TransfersDialog::chunkRandom()
|
||||||
{
|
{
|
||||||
|
#ifdef WINDOWS_SYS
|
||||||
|
if(QMessageBox::Yes != QMessageBox::warning(nullptr,tr("Warning"),tr("On Windows systems, writing in the middle of large empty files may hang the software for several seconds. Do you want to use this option anyway?"),QMessageBox::Yes,QMessageBox::No))
|
||||||
|
return;
|
||||||
|
#endif
|
||||||
setChunkStrategy(FileChunksInfo::CHUNK_STRATEGY_RANDOM) ;
|
setChunkStrategy(FileChunksInfo::CHUNK_STRATEGY_RANDOM) ;
|
||||||
}
|
}
|
||||||
void TransfersDialog::chunkProgressive()
|
void TransfersDialog::chunkProgressive()
|
||||||
|
|
|
@ -30,6 +30,7 @@
|
||||||
#include "retroshare/rspeers.h"
|
#include "retroshare/rspeers.h"
|
||||||
|
|
||||||
#include <QCheckBox>
|
#include <QCheckBox>
|
||||||
|
#include <QMessageBox>
|
||||||
#include <QToolTip>
|
#include <QToolTip>
|
||||||
|
|
||||||
#include <iostream>
|
#include <iostream>
|
||||||
|
@ -214,7 +215,15 @@ void TransferPage::updateDefaultStrategy(int i)
|
||||||
case 0: rsFiles->setDefaultChunkStrategy(FileChunksInfo::CHUNK_STRATEGY_STREAMING) ;
|
case 0: rsFiles->setDefaultChunkStrategy(FileChunksInfo::CHUNK_STRATEGY_STREAMING) ;
|
||||||
break ;
|
break ;
|
||||||
|
|
||||||
case 2: rsFiles->setDefaultChunkStrategy(FileChunksInfo::CHUNK_STRATEGY_RANDOM) ;
|
case 2:
|
||||||
|
#ifdef WINDOWS_SYS
|
||||||
|
if(QMessageBox::Yes != QMessageBox::warning(nullptr,tr("Warning"),tr("On Windows systems, randomly writing in the middle of large empty files may hang the software for several seconds. Do you want to use this option anyway?"),QMessageBox::Yes,QMessageBox::No))
|
||||||
|
{
|
||||||
|
ui._defaultStrategy_CB->setCurrentIndex(0);
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
#endif
|
||||||
|
rsFiles->setDefaultChunkStrategy(FileChunksInfo::CHUNK_STRATEGY_RANDOM) ;
|
||||||
break ;
|
break ;
|
||||||
|
|
||||||
case 1: rsFiles->setDefaultChunkStrategy(FileChunksInfo::CHUNK_STRATEGY_PROGRESSIVE) ;
|
case 1: rsFiles->setDefaultChunkStrategy(FileChunksInfo::CHUNK_STRATEGY_PROGRESSIVE) ;
|
||||||
|
|
|
@ -30,7 +30,7 @@
|
||||||
<item>
|
<item>
|
||||||
<widget class="QPushButton" name="editShareButton">
|
<widget class="QPushButton" name="editShareButton">
|
||||||
<property name="text">
|
<property name="text">
|
||||||
<string>Edit Share</string>
|
<string>Configure shared directories</string>
|
||||||
</property>
|
</property>
|
||||||
</widget>
|
</widget>
|
||||||
</item>
|
</item>
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue