mirror of
https://github.com/mapmapteam/mapmap.git
synced 2026-06-16 12:33:19 +02:00
Fix some bugs about Windows release
This commit is contained in:
@@ -148,8 +148,10 @@ void PreferenceDialog::refreshCurrentIP()
|
||||
{
|
||||
foreach (const QHostAddress &address, QNetworkInterface::allAddresses()) {
|
||||
if (address.protocol() == QAbstractSocket::IPv4Protocol
|
||||
&& address != QHostAddress(QHostAddress::LocalHost))
|
||||
&& address != QHostAddress(QHostAddress::LocalHost)) {
|
||||
_machineAddressLabel->setText(address.toString());
|
||||
break;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
@@ -147,8 +147,13 @@ int main(int argc, char *argv[])
|
||||
{
|
||||
QLocale::setDefault(QLocale(lang));
|
||||
QTranslator qtTranslator;
|
||||
#ifdef Q_OS_WIN32
|
||||
qtTranslator.load(QString("qt_%1").arg(lang),
|
||||
QApplication::applicationDirPath().append("/translations"));
|
||||
#else
|
||||
qtTranslator.load(QString("qtbase_%1").arg(lang),
|
||||
QLibraryInfo::location(QLibraryInfo::TranslationsPath));
|
||||
#endif
|
||||
app.installTranslator(&qtTranslator);
|
||||
|
||||
QTranslator localization;
|
||||
|
||||
Reference in New Issue
Block a user