mirror of
https://github.com/Cockatrice/Cockatrice.git
synced 2026-07-20 09:22:15 -07:00
refactors
This commit is contained in:
parent
cce2747bef
commit
4aa5bab38d
1 changed files with 4 additions and 4 deletions
|
|
@ -190,14 +190,14 @@ void TabReplays::openRemoteReplayFinished(const Response &r)
|
||||||
|
|
||||||
void TabReplays::actDownload()
|
void TabReplays::actDownload()
|
||||||
{
|
{
|
||||||
QString folderPath;
|
QString dirPath;
|
||||||
QModelIndex curLeft = localDirView->selectionModel()->currentIndex();
|
QModelIndex curLeft = localDirView->selectionModel()->currentIndex();
|
||||||
if (!curLeft.isValid())
|
if (!curLeft.isValid())
|
||||||
folderPath = localDirModel->rootPath();
|
dirPath = localDirModel->rootPath();
|
||||||
else {
|
else {
|
||||||
while (!localDirModel->isDir(curLeft))
|
while (!localDirModel->isDir(curLeft))
|
||||||
curLeft = curLeft.parent();
|
curLeft = curLeft.parent();
|
||||||
folderPath = localDirModel->filePath(curLeft);
|
dirPath = localDirModel->filePath(curLeft);
|
||||||
}
|
}
|
||||||
|
|
||||||
const auto curRights = serverDirView->getSelectedReplays();
|
const auto curRights = serverDirView->getSelectedReplays();
|
||||||
|
|
@ -210,7 +210,7 @@ void TabReplays::actDownload()
|
||||||
}
|
}
|
||||||
|
|
||||||
for (const auto curRight : curRights) {
|
for (const auto curRight : curRights) {
|
||||||
const QString filePath = folderPath + QString("/replay_%1.cor").arg(curRight->replay_id());
|
const QString filePath = dirPath + QString("/replay_%1.cor").arg(curRight->replay_id());
|
||||||
|
|
||||||
Command_ReplayDownload cmd;
|
Command_ReplayDownload cmd;
|
||||||
cmd.set_replay_id(curRight->replay_id());
|
cmd.set_replay_id(curRight->replay_id());
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue