Skip to content

Commit 731971f

Browse files
committed
Follow naming conventions for private members of license class.
1 parent 8046984 commit 731971f

File tree

2 files changed

+15
-16
lines changed

2 files changed

+15
-16
lines changed

license.cpp

+7-7
Original file line numberDiff line numberDiff line change
@@ -10,7 +10,7 @@
1010

1111
void License::printLicenseHash() const
1212
{
13-
qDebug() << _licenseHash;
13+
qDebug() << m_licenseHash;
1414
}
1515

1616
uint License::generateLicenseHash(QString addr)
@@ -29,30 +29,30 @@ void License::saveToFile(QString fileName, QString path)
2929
}
3030

3131
QTextStream stream(&file);
32-
stream << _licenseHash;
32+
stream << m_licenseHash;
3333
}
3434

3535
QDate License::getExpiryDate() const
3636
{
37-
return _expiryDate;
37+
return m_expiryDate;
3838
}
3939

4040
uint License::getLicenseHash() const
4141
{
42-
return _licenseHash;
42+
return m_licenseHash;
4343
}
4444

4545
QString License::getMacAddress() const
4646
{
47-
return _macAddress;
47+
return m_macAddress;
4848
}
4949

5050
void License::setExpiryDate(QDate expiry)
5151
{
52-
_expiryDate = expiry;
52+
m_expiryDate = expiry;
5353
}
5454

5555
void License::setMacAddress(QString mac)
5656
{
57-
_macAddress = mac;
57+
m_macAddress = mac;
5858
}

license.h

+8-9
Original file line numberDiff line numberDiff line change
@@ -11,23 +11,22 @@ class License
1111
public:
1212
// Constructors
1313
License() :
14-
_macAddress(""), _expiryDate(QDate::currentDate()), _licenseHash(000)
14+
m_macAddress(""), m_expiryDate(QDate::currentDate()), m_licenseHash(000)
1515
{
1616
saveToFile(QString("test.txt"));
1717
}
1818

1919
License(QString mac):
20-
_macAddress(mac), _expiryDate(QDate::currentDate())
20+
m_macAddress(mac), m_expiryDate(QDate::currentDate())
2121
{
22-
_licenseHash = generateLicenseHash(_macAddress);
22+
m_licenseHash = generateLicenseHash(m_macAddress);
2323
saveToFile(QString("test.txt"));
2424
}
2525

2626
License(QString mac, QDate expiry) :
27-
_macAddress(mac),
28-
_expiryDate(expiry)
27+
m_macAddress(mac), m_expiryDate(expiry)
2928
{
30-
_licenseHash = generateLicenseHash(_macAddress);
29+
m_licenseHash = generateLicenseHash(m_macAddress);
3130
saveToFile(QString("test.txt"));
3231
}
3332

@@ -50,9 +49,9 @@ class License
5049
void setMacAddress(QString mac);
5150

5251
private:
53-
uint _licenseHash;
54-
QDate _expiryDate;
55-
QString _macAddress;
52+
uint m_licenseHash;
53+
QDate m_expiryDate;
54+
QString m_macAddress;
5655
};
5756

5857
#endif // LICENSE_H

0 commit comments

Comments
 (0)