Changeset 14261


Ignore:
Timestamp:
Apr 27, 2014, 12:33:19 AM (8 years ago)
Author:
jordan
Message:

(trunk qt) #5514 'enhanced network status' -- reset the torrent model when we reconnect to the transmission session after a network failure

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/qt/mainwin.cc

    r14254 r14261  
    724724  myModel.getTransferSpeed (upSpeed, upCount, downSpeed, downCount);
    725725
    726   if (!upCount && !downCount)
     726  if (myNetworkError)
     727    {
     728      tip  = tr ("Network Error");
     729    }
     730  else if (!upCount && !downCount)
    727731    {
    728732      tip = tr ("Idle");
     
    14091413TrMainWindow :: onError (QNetworkReply::NetworkError code)
    14101414{
    1411     if (code != QNetworkReply::NoError)
    1412         myNetworkError = true;
    1413     else
    1414         myNetworkError = false;
     1415  const bool hadError = myNetworkError;
     1416  const bool haveError = code != QNetworkReply::NoError;
     1417
     1418  myNetworkError = haveError;
     1419  refreshTrayIconSoon();
     1420  updateNetworkIcon();
     1421
     1422  // Refresh our model if we've just gotten a clean connection to the session.
     1423  // That way we can rebuild after a restart of transmission-daemon
     1424  if (hadError && !haveError)
     1425    myModel.clear();
    14151426}
    14161427
Note: See TracChangeset for help on using the changeset viewer.