Mercurial > trustbridge
comparison ui/downloader_win.cpp @ 20:fec1a610d43f
Mark usage of goto with TODOs to remove them
author | Andre Heinecke <aheinecke@intevation.de> |
---|---|
date | Thu, 20 Feb 2014 10:57:20 +0000 |
parents | f4f957c58e0a |
children | 7d07d261b003 |
comparison
equal
deleted
inserted
replaced
19:9af6198deb8e | 20:fec1a610d43f |
---|---|
275 | 275 |
276 retval = QDateTime(QDate(lMod.wYear, lMod.wMonth, lMod.wDay), | 276 retval = QDateTime(QDate(lMod.wYear, lMod.wMonth, lMod.wDay), |
277 QTime(lMod.wHour, lMod.wMinute, lMod.wSecond, | 277 QTime(lMod.wHour, lMod.wMinute, lMod.wSecond, |
278 lMod.wMilliseconds), | 278 lMod.wMilliseconds), |
279 Qt::UTC); | 279 Qt::UTC); |
280 | |
281 // TODO remove and replace with a smart handle | |
280 cleanup: | 282 cleanup: |
281 if (hRequest) { | 283 if (hRequest) { |
282 WinHttpCloseHandle(hRequest); | 284 WinHttpCloseHandle(hRequest); |
283 } | 285 } |
284 | 286 |
427 retval = false; | 429 retval = false; |
428 break; | 430 break; |
429 } | 431 } |
430 } while (bytesAvailable > 0); | 432 } while (bytesAvailable > 0); |
431 | 433 |
434 // TODO remove and replace with a smart handle | |
432 cleanup: | 435 cleanup: |
433 | 436 |
434 if (retval && outputFile.isOpen()) { | 437 if (retval && outputFile.isOpen()) { |
435 // Actually save the file to disk / move to homedir | 438 // Actually save the file to disk / move to homedir |
436 retval = outputFile.commit(); | 439 retval = outputFile.commit(); |
544 if (!results) { | 547 if (!results) { |
545 // Report any errors. | 548 // Report any errors. |
546 DEBUG << "Error" << GetLastError(); | 549 DEBUG << "Error" << GetLastError(); |
547 emit error(tr("Unknown Problem when connecting"), ErrUnknown); | 550 emit error(tr("Unknown Problem when connecting"), ErrUnknown); |
548 } | 551 } |
552 | |
553 // TODO remove and replace with a smart handle | |
549 cleanup: | 554 cleanup: |
550 if (hConnect) { | 555 if (hConnect) { |
551 WinHttpCloseHandle(hConnect); | 556 WinHttpCloseHandle(hConnect); |
552 } | 557 } |
553 | 558 |