forked from qt-creator/qt-creator
Merge remote-tracking branch 'origin/2.7'
Conflicts: src/plugins/projectexplorer/devicesupport/devicemanager.cpp Change-Id: I1d46128f530428315e7ab5d52c8115036371487f
This commit is contained in:
@@ -44,6 +44,7 @@
|
||||
|
||||
#include <QtPlugin>
|
||||
#include <QDebug>
|
||||
#include <QDateTime>
|
||||
|
||||
using namespace Core;
|
||||
using namespace Core::Internal;
|
||||
@@ -87,6 +88,7 @@ void CorePlugin::parseArguments(const QStringList &arguments)
|
||||
|
||||
bool CorePlugin::initialize(const QStringList &arguments, QString *errorMessage)
|
||||
{
|
||||
qsrand(QDateTime::currentDateTime().toTime_t());
|
||||
parseArguments(arguments);
|
||||
const bool success = m_mainWindow->init(errorMessage);
|
||||
if (success) {
|
||||
|
||||
@@ -319,7 +319,7 @@ static void localizedText(const QStringList &locales, QXmlStreamReader *reader,
|
||||
} else {
|
||||
if (*currentLocale < 0 && currentText->isEmpty()) {
|
||||
*currentText = QCoreApplication::translate("Core::Internal::ExternalTool",
|
||||
reader->readElementText().toLatin1().constData());
|
||||
reader->readElementText().toUtf8().constData());
|
||||
} else {
|
||||
reader->skipCurrentElement();
|
||||
}
|
||||
|
||||
@@ -75,7 +75,6 @@ QWidget *ToolSettings::createPage(QWidget *parent)
|
||||
|
||||
static QString getUserFilePath(const QString &proposalFileName)
|
||||
{
|
||||
static bool seeded = false;
|
||||
QDir resourceDir(ICore::userResourcePath());
|
||||
if (!resourceDir.exists(QLatin1String("externaltools")))
|
||||
resourceDir.mkpath(QLatin1String("externaltools"));
|
||||
@@ -89,10 +88,6 @@ static QString getUserFilePath(const QString &proposalFileName)
|
||||
if (count > 15)
|
||||
return QString();
|
||||
// add random number
|
||||
if (!seeded) {
|
||||
seeded = true;
|
||||
qsrand(QTime::currentTime().msec());
|
||||
}
|
||||
int number = qrand() % 1000;
|
||||
tryPath = newFilePath + QString::number(number) + suffix;
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user