- Timestamp:
- Sep 9, 2008 11:29:49 AM (16 years ago)
- Location:
- trunk/src/VBox/Frontends/VirtualBox4
- Files:
-
- 3 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/src/VBox/Frontends/VirtualBox4/include/VBoxDefs.h
r10439 r12286 172 172 static const char* GUI_UpdateDlgWinID; 173 173 static const char* GUI_UpdateDate; 174 static const char* GUI_UpdateCheckCount; 174 175 static const char* GUI_LastVMSelected; 175 176 static const char* GUI_InfoDlgState; -
trunk/src/VBox/Frontends/VirtualBox4/src/VBoxDefs.cpp
r10439 r12286 40 40 const char* VBoxDefs::GUI_UpdateDlgWinID = "GUI/UpdateDlgWinID"; 41 41 const char* VBoxDefs::GUI_UpdateDate = "GUI/UpdateDate"; 42 const char* VBoxDefs::GUI_UpdateCheckCount = "GUI/UpdateCheckCount"; 42 43 const char* VBoxDefs::GUI_LastVMSelected = "GUI/LastVMSelected"; 43 44 const char* VBoxDefs::GUI_InfoDlgState = "GUI/InfoDlgState"; -
trunk/src/VBox/Frontends/VirtualBox4/src/VBoxUpdateDlg.cpp
r11466 r12286 295 295 SLOT (onNetError (const QString&))); 296 296 297 int count = 1; 298 bool ok = false; 299 QString sc = vboxGlobal().virtualBox().GetExtraData (VBoxDefs::GUI_UpdateCheckCount); 300 if (!sc.isEmpty()) 301 { 302 int c = sc.toLongLong(&ok); 303 if (ok) 304 count = c; 305 } 297 306 QString package = vboxGlobal().virtualBox().GetPackageType(); 298 307 QString version = vboxGlobal().virtualBox().GetVersion(); 308 QString revision = QString::number (vboxGlobal().virtualBox().GetRevision()); 299 309 package = QUrl::toPercentEncoding (package); 300 310 version = QUrl::toPercentEncoding (version); 311 revision = QUrl::toPercentEncoding (revision); 301 312 QString body; 302 313 body += QString ("platform=%1").arg (package); 303 body += QString ("&version=%1").arg (version); 314 body += QString ("&version=%1_%2").arg (version).arg (revision); 315 body += QString ("&count=%1").arg (count); 304 316 305 317 QStringList header ("User-Agent"); … … 436 448 } 437 449 } 438 } 439 450 451 int count = 1; 452 bool ok = false; 453 QString sc = vboxGlobal().virtualBox().GetExtraData (VBoxDefs::GUI_UpdateCheckCount); 454 if (!sc.isEmpty()) 455 count = sc.toLongLong(&ok); 456 vboxGlobal().virtualBox().SetExtraData (VBoxDefs::GUI_UpdateCheckCount, 457 QString ("%1").arg ((qulonglong) count + 1)); 458 } 459
Note:
See TracChangeset
for help on using the changeset viewer.