SystemInfo: various cleanup.
* Rename the copy slot to match naming convention elsewhere * Remove the Mac 10.7/10.8 detection as we don't support it now
This commit is contained in:
parent
59c4ccfa75
commit
74291017e5
|
@ -27,14 +27,14 @@ DSystemInfo::DSystemInfo(QWidget* parent_widget) :
|
||||||
UpdateSystemInfo();
|
UpdateSystemInfo();
|
||||||
|
|
||||||
QPushButton* btn = m_ui->buttonBox->addButton(tr("Copy"), QDialogButtonBox::ActionRole);
|
QPushButton* btn = m_ui->buttonBox->addButton(tr("Copy"), QDialogButtonBox::ActionRole);
|
||||||
connect(btn, SIGNAL(pressed()), this, SLOT(btnCopy_pressed()));
|
connect(btn, SIGNAL(pressed()), this, SLOT(CopyPressed()));
|
||||||
}
|
}
|
||||||
|
|
||||||
DSystemInfo::~DSystemInfo()
|
DSystemInfo::~DSystemInfo()
|
||||||
{
|
{
|
||||||
}
|
}
|
||||||
|
|
||||||
void DSystemInfo::btnCopy_pressed()
|
void DSystemInfo::CopyPressed()
|
||||||
{
|
{
|
||||||
QClipboard* clipboard = QApplication::clipboard();
|
QClipboard* clipboard = QApplication::clipboard();
|
||||||
clipboard->setText(m_ui->txtSysInfo->toPlainText());
|
clipboard->setText(m_ui->txtSysInfo->toPlainText());
|
||||||
|
@ -75,8 +75,6 @@ QString DSystemInfo::GetOS() const
|
||||||
#elif defined(Q_OS_MAC)
|
#elif defined(Q_OS_MAC)
|
||||||
ret += SL("Mac OS X ");
|
ret += SL("Mac OS X ");
|
||||||
switch (QSysInfo::MacintoshVersion) {
|
switch (QSysInfo::MacintoshVersion) {
|
||||||
case QSysInfo::MV_10_7: ret += SL("10.7"); break;
|
|
||||||
case QSysInfo::MV_10_8: ret += SL("10.8"); break;
|
|
||||||
case QSysInfo::MV_10_9: ret += SL("10.9"); break;
|
case QSysInfo::MV_10_9: ret += SL("10.9"); break;
|
||||||
default: ret += SL("(unknown)"); break;
|
default: ret += SL("(unknown)"); break;
|
||||||
}
|
}
|
||||||
|
|
|
@ -21,7 +21,7 @@ public:
|
||||||
~DSystemInfo();
|
~DSystemInfo();
|
||||||
|
|
||||||
private slots:
|
private slots:
|
||||||
void btnCopy_pressed();
|
void CopyPressed();
|
||||||
|
|
||||||
private:
|
private:
|
||||||
std::unique_ptr<Ui::DSystemInfo> m_ui;
|
std::unique_ptr<Ui::DSystemInfo> m_ui;
|
||||||
|
|
Loading…
Reference in New Issue