SonarQube warnings.
--HG-- branch : release
This commit is contained in:
parent
495397621d
commit
a78b758226
|
@ -470,8 +470,8 @@ bool MApplication::event(QEvent *e)
|
||||||
//---------------------------------------------------------------------------------------------------------------------
|
//---------------------------------------------------------------------------------------------------------------------
|
||||||
void MApplication::OpenSettings()
|
void MApplication::OpenSettings()
|
||||||
{
|
{
|
||||||
settings = new VTapeSettings(QSettings::IniFormat, QSettings::UserScope, QApplication::organizationName(),
|
settings = new VTapeSettings(QSettings::IniFormat, QSettings::UserScope, QCoreApplication::organizationName(),
|
||||||
QApplication::applicationName(), this);
|
QCoreApplication::applicationName(), this);
|
||||||
}
|
}
|
||||||
|
|
||||||
//---------------------------------------------------------------------------------------------------------------------
|
//---------------------------------------------------------------------------------------------------------------------
|
||||||
|
|
|
@ -459,7 +459,8 @@ QString VApplication::LogDirPath() const
|
||||||
QStandardPaths::LocateDirectory) + "Valentina";
|
QStandardPaths::LocateDirectory) + "Valentina";
|
||||||
#else
|
#else
|
||||||
const QString logDirPath = QStandardPaths::locate(QStandardPaths::ConfigLocation, QString(),
|
const QString logDirPath = QStandardPaths::locate(QStandardPaths::ConfigLocation, QString(),
|
||||||
QStandardPaths::LocateDirectory) + organizationName();
|
QStandardPaths::LocateDirectory)
|
||||||
|
+ QCoreApplication::organizationName();
|
||||||
#endif
|
#endif
|
||||||
return logDirPath;
|
return logDirPath;
|
||||||
}
|
}
|
||||||
|
@ -674,8 +675,8 @@ bool VApplication::event(QEvent *e)
|
||||||
*/
|
*/
|
||||||
void VApplication::OpenSettings()
|
void VApplication::OpenSettings()
|
||||||
{
|
{
|
||||||
settings = new VSettings(QSettings::IniFormat, QSettings::UserScope, QApplication::organizationName(),
|
settings = new VSettings(QSettings::IniFormat, QSettings::UserScope, QCoreApplication::organizationName(),
|
||||||
QApplication::applicationName(), this);
|
QCoreApplication::applicationName(), this);
|
||||||
}
|
}
|
||||||
|
|
||||||
//---------------------------------------------------------------------------------------------------------------------
|
//---------------------------------------------------------------------------------------------------------------------
|
||||||
|
|
|
@ -37,7 +37,6 @@
|
||||||
#include "vcmdexport.h"
|
#include "vcmdexport.h"
|
||||||
|
|
||||||
class VApplication;// use in define
|
class VApplication;// use in define
|
||||||
class VPattern;
|
|
||||||
|
|
||||||
#if defined(qApp)
|
#if defined(qApp)
|
||||||
#undef qApp
|
#undef qApp
|
||||||
|
|
|
@ -53,7 +53,7 @@ VCommandLine::VCommandLine() : parser(), optionsUsed(), optionsIndex(), isGuiEna
|
||||||
VCommandLineOptions::const_iterator i = optionsUsed.constBegin();
|
VCommandLineOptions::const_iterator i = optionsUsed.constBegin();
|
||||||
while (i != optionsUsed.constEnd())
|
while (i != optionsUsed.constEnd())
|
||||||
{
|
{
|
||||||
parser.addOption(*((*i)));
|
parser.addOption(*(*i));
|
||||||
++i;
|
++i;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
|
@ -159,7 +159,7 @@ void PreferencesConfigurationPage::Apply()
|
||||||
m_unitChanged = false;
|
m_unitChanged = false;
|
||||||
const QString text = tr("The Default unit has been updated and will be used as the default for the next "
|
const QString text = tr("The Default unit has been updated and will be used as the default for the next "
|
||||||
"pattern you create.");
|
"pattern you create.");
|
||||||
QMessageBox::information(this, QApplication::applicationName(), text);
|
QMessageBox::information(this, QCoreApplication::applicationName(), text);
|
||||||
}
|
}
|
||||||
if (m_labelLangChanged)
|
if (m_labelLangChanged)
|
||||||
{
|
{
|
||||||
|
|
|
@ -57,7 +57,12 @@ PreferencesPathPage::~PreferencesPathPage()
|
||||||
//---------------------------------------------------------------------------------------------------------------------
|
//---------------------------------------------------------------------------------------------------------------------
|
||||||
void PreferencesPathPage::Apply()
|
void PreferencesPathPage::Apply()
|
||||||
{
|
{
|
||||||
|
VSettings *settings = qApp->ValentinaSettings();
|
||||||
|
settings->SetPathIndividualMeasurements(ui->pathTable->item(0, 1)->text());
|
||||||
|
settings->SetPathStandardMeasurements(ui->pathTable->item(1, 1)->text());
|
||||||
|
settings->SetPathPattern(ui->pathTable->item(2, 1)->text());
|
||||||
|
settings->SetPathLayout(ui->pathTable->item(3, 1)->text());
|
||||||
|
settings->SetPathTemplate(ui->pathTable->item(4, 1)->text());
|
||||||
}
|
}
|
||||||
|
|
||||||
//---------------------------------------------------------------------------------------------------------------------
|
//---------------------------------------------------------------------------------------------------------------------
|
||||||
|
|
|
@ -49,7 +49,7 @@ PreferencesPatternPage::PreferencesPatternPage(QWidget *parent)
|
||||||
pSet->ClearUserDefinedMaterial();
|
pSet->ClearUserDefinedMaterial();
|
||||||
pSet->sync();
|
pSet->sync();
|
||||||
QString qsMsg = tr("All user defined materials have been deleted!");
|
QString qsMsg = tr("All user defined materials have been deleted!");
|
||||||
QMessageBox::information(this, QApplication::applicationName(), qsMsg);
|
QMessageBox::information(this, QCoreApplication::applicationName(), qsMsg);
|
||||||
});
|
});
|
||||||
|
|
||||||
ui->forbidFlippingCheck->setChecked(qApp->ValentinaSettings()->GetForbidWorkpieceFlipping());
|
ui->forbidFlippingCheck->setChecked(qApp->ValentinaSettings()->GetForbidWorkpieceFlipping());
|
||||||
|
|
|
@ -228,25 +228,25 @@ bool FvUpdater::CheckForUpdates(bool silentAsMuchAsItCouldGet)
|
||||||
|
|
||||||
// Check if application's organization name and domain are set, fail otherwise
|
// Check if application's organization name and domain are set, fail otherwise
|
||||||
// (nowhere to store QSettings to)
|
// (nowhere to store QSettings to)
|
||||||
if (QApplication::organizationName().isEmpty())
|
if (QCoreApplication::organizationName().isEmpty())
|
||||||
{
|
{
|
||||||
qCritical() << "QApplication::organizationName is not set. Please do that.";
|
qCritical() << "QApplication::organizationName is not set. Please do that.";
|
||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
if (QApplication::organizationDomain().isEmpty())
|
if (QCoreApplication::organizationDomain().isEmpty())
|
||||||
{
|
{
|
||||||
qCritical() << "QApplication::organizationDomain is not set. Please do that.";
|
qCritical() << "QApplication::organizationDomain is not set. Please do that.";
|
||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
|
|
||||||
// Set application name / version is not set yet
|
// Set application name / version is not set yet
|
||||||
if (QApplication::applicationName().isEmpty())
|
if (QCoreApplication::applicationName().isEmpty())
|
||||||
{
|
{
|
||||||
qCritical() << "QApplication::applicationName is not set. Please do that.";
|
qCritical() << "QApplication::applicationName is not set. Please do that.";
|
||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
|
|
||||||
if (QApplication::applicationVersion().isEmpty())
|
if (QCoreApplication::applicationVersion().isEmpty())
|
||||||
{
|
{
|
||||||
qCritical() << "QApplication::applicationVersion is not set. Please do that.";
|
qCritical() << "QApplication::applicationVersion is not set. Please do that.";
|
||||||
return false;
|
return false;
|
||||||
|
@ -299,7 +299,7 @@ void FvUpdater::startDownloadFeed(const QUrl &url)
|
||||||
|
|
||||||
QNetworkRequest request;
|
QNetworkRequest request;
|
||||||
request.setHeader(QNetworkRequest::ContentTypeHeader, QStringLiteral("application/xml"));
|
request.setHeader(QNetworkRequest::ContentTypeHeader, QStringLiteral("application/xml"));
|
||||||
request.setHeader(QNetworkRequest::UserAgentHeader, QApplication::applicationName());
|
request.setHeader(QNetworkRequest::UserAgentHeader, QCoreApplication::applicationName());
|
||||||
request.setUrl(url);
|
request.setUrl(url);
|
||||||
request.setSslConfiguration(QSslConfiguration::defaultConfiguration());
|
request.setSslConfiguration(QSslConfiguration::defaultConfiguration());
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue
Block a user