QTfrontend/ui/widget/feedbackdialog.cpp
changeset 8887 539380a498e4
parent 8874 8121ce2b0a88
child 8924 13ac59499066
equal deleted inserted replaced
8792:af4ab297b2b7 8887:539380a498e4
    72     QHBoxLayout * descriptionLayout = new QHBoxLayout();
    72     QHBoxLayout * descriptionLayout = new QHBoxLayout();
    73     QHBoxLayout * combinedTopLayout = new QHBoxLayout();
    73     QHBoxLayout * combinedTopLayout = new QHBoxLayout();
    74     QHBoxLayout * systemLayout = new QHBoxLayout();
    74     QHBoxLayout * systemLayout = new QHBoxLayout();
    75 
    75 
    76     info = new QLabel();
    76     info = new QLabel();
    77     info->setText(
    77     info->setText(QString(
    78         "<style type=\"text/css\">"
    78         "<style type=\"text/css\">"
    79         "a { color: #fc0; }"
    79         "a { color: #fc0; }"
    80         "b { color: #0df; }"
    80         "b { color: #0df; }"
    81         "</style>"
    81         "</style>"
    82         "<div align=\"center\"><h1>Please give us feedback!</h1>"
    82         "<div align=\"center\"><h1>%1</h1>"
    83         "<h3>We are always happy about suggestions, ideas, or bug reports.<h3>"
    83         "<h3>%2<h3>"
    84         "<h4>Your email address is optional, but we may want to contact you.<h4>"
    84         "<h4>%3 <a href=\"http://code.google.com/p/hedgewars/wiki/KnownBugs\">known bugs</a><h4>"
    85         "</div>"
    85         "<h4>%4<h4>"
       
    86         "</div>")
       
    87         .arg(tr("Send us feedback!"))
       
    88         .arg(tr("We are always happy about suggestions, ideas, or bug reports."))
       
    89         .arg(tr("If you found a bug, you can see if it's already been reported here: "))
       
    90         .arg(tr("Your email address is optional, but necessary if you want us to get back at you."))
    86     );
    91     );
       
    92     info->setOpenExternalLinks(true);
    87     pageLayout->addWidget(info);
    93     pageLayout->addWidget(info);
    88 
    94 
    89     QVBoxLayout * summaryEmailLayout = new QVBoxLayout();
    95     QVBoxLayout * summaryEmailLayout = new QVBoxLayout();
    90 
    96 
    91     const int labelWidth = 90;
    97     const int labelWidth = 90;
   236     GetSystemInfo(&sysinfo);
   242     GetSystemInfo(&sysinfo);
   237     number_of_cores += QString::number(sysinfo.dwNumberOfProcessors) + "\n";
   243     number_of_cores += QString::number(sysinfo.dwNumberOfProcessors) + "\n";
   238     MEMORYSTATUSEX status;
   244     MEMORYSTATUSEX status;
   239     status.dwLength = sizeof(status);
   245     status.dwLength = sizeof(status);
   240     GlobalMemoryStatusEx(&status);
   246     GlobalMemoryStatusEx(&status);
   241     total_ram += QString::number(status.ullTotalPhys) + "\n";
   247     total_ram += QString::number(status.ullTotalPhys/1024/1024) + " MB\n";
   242 
   248 
   243     switch(QSysInfo::WinVersion())
   249     switch(QSysInfo::windowsVersion())
   244     {
   250     {
       
   251         case QSysInfo::WV_NT: os_version += "Windows NT\n"; break;
   245         case QSysInfo::WV_2000: os_version += "Windows 2000\n"; break;
   252         case QSysInfo::WV_2000: os_version += "Windows 2000\n"; break;
   246         case QSysInfo::WV_XP: os_version += "Windows XP\n"; break;
   253         case QSysInfo::WV_XP: os_version += "Windows XP\n"; break;
       
   254         case QSysInfo::WV_2003: os_version += "Windows Server 2003\n"; break;
   247         case QSysInfo::WV_VISTA: os_version += "Windows Vista\n"; break;
   255         case QSysInfo::WV_VISTA: os_version += "Windows Vista\n"; break;
   248         case QSysInfo::WV_WINDOWS7: os_version += "Windows 7\n"; break;
   256         case QSysInfo::WV_WINDOWS7: os_version += "Windows 7\n"; break;
   249         //case QSysInfo::WV_WINDOWS8: os_version += "Windows 8\n"; break; //QT 5+
   257         //case QSysInfo::WV_WINDOWS8: os_version += "Windows 8\n"; break; //QT 5+
   250         default: os_version += "Windows (Unknown version)\n"; break;
   258         default: os_version += "Windows (Unknown version)\n"; break;
   251     }
   259     }
   258 #ifndef Q_OS_FREEBSD
   266 #ifndef Q_OS_FREEBSD
   259          available_pages = sysconf(_SC_AVPHYS_PAGES),
   267          available_pages = sysconf(_SC_AVPHYS_PAGES),
   260 #else
   268 #else
   261          available_pages = 0,
   269          available_pages = 0,
   262 #endif*/
   270 #endif*/
   263          page_size = sysconf(_SC_PAGE_SIZE);
   271     page_size = sysconf(_SC_PAGE_SIZE);
   264     total_ram += QString::number(pages * page_size) + "\n";
   272     total_ram += QString::number(pages*page_size/1024/1024) + " MB\n";
   265     os_version += "GNU/Linux or BSD\n";
   273     os_version += "GNU/Linux or BSD\n";
   266 #endif
   274 #endif
   267 
   275 
   268     // uname -a
   276     // uname -a
   269 #if defined(Q_WS_X11) || defined(Q_WS_MACX)
   277 #if defined(Q_WS_X11) || defined(Q_WS_MACX)