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()
|
||||
{
|
||||
settings = new VTapeSettings(QSettings::IniFormat, QSettings::UserScope, QApplication::organizationName(),
|
||||
QApplication::applicationName(), this);
|
||||
settings = new VTapeSettings(QSettings::IniFormat, QSettings::UserScope, QCoreApplication::organizationName(),
|
||||
QCoreApplication::applicationName(), this);
|
||||
}
|
||||
|
||||
//---------------------------------------------------------------------------------------------------------------------
|
||||
|
|
|
@ -459,7 +459,8 @@ QString VApplication::LogDirPath() const
|
|||
QStandardPaths::LocateDirectory) + "Valentina";
|
||||
#else
|
||||
const QString logDirPath = QStandardPaths::locate(QStandardPaths::ConfigLocation, QString(),
|
||||
QStandardPaths::LocateDirectory) + organizationName();
|
||||
QStandardPaths::LocateDirectory)
|
||||
+ QCoreApplication::organizationName();
|
||||
#endif
|
||||
return logDirPath;
|
||||
}
|
||||
|
@ -674,8 +675,8 @@ bool VApplication::event(QEvent *e)
|
|||
*/
|
||||
void VApplication::OpenSettings()
|
||||
{
|
||||
settings = new VSettings(QSettings::IniFormat, QSettings::UserScope, QApplication::organizationName(),
|
||||
QApplication::applicationName(), this);
|
||||
settings = new VSettings(QSettings::IniFormat, QSettings::UserScope, QCoreApplication::organizationName(),
|
||||
QCoreApplication::applicationName(), this);
|
||||
}
|
||||
|
||||
//---------------------------------------------------------------------------------------------------------------------
|
||||
|
|
|
@ -37,7 +37,6 @@
|
|||
#include "vcmdexport.h"
|
||||
|
||||
class VApplication;// use in define
|
||||
class VPattern;
|
||||
|
||||
#if defined(qApp)
|
||||
#undef qApp
|
||||
|
|
|
@ -53,7 +53,7 @@ VCommandLine::VCommandLine() : parser(), optionsUsed(), optionsIndex(), isGuiEna
|
|||
VCommandLineOptions::const_iterator i = optionsUsed.constBegin();
|
||||
while (i != optionsUsed.constEnd())
|
||||
{
|
||||
parser.addOption(*((*i)));
|
||||
parser.addOption(*(*i));
|
||||
++i;
|
||||
}
|
||||
}
|
||||
|
|
|
@ -159,7 +159,7 @@ void PreferencesConfigurationPage::Apply()
|
|||
m_unitChanged = false;
|
||||
const QString text = tr("The Default unit has been updated and will be used as the default for the next "
|
||||
"pattern you create.");
|
||||
QMessageBox::information(this, QApplication::applicationName(), text);
|
||||
QMessageBox::information(this, QCoreApplication::applicationName(), text);
|
||||
}
|
||||
if (m_labelLangChanged)
|
||||
{
|
||||
|
|
|
@ -57,7 +57,12 @@ PreferencesPathPage::~PreferencesPathPage()
|
|||
//---------------------------------------------------------------------------------------------------------------------
|
||||
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->sync();
|
||||
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());
|
||||
|
|
|
@ -228,25 +228,25 @@ bool FvUpdater::CheckForUpdates(bool silentAsMuchAsItCouldGet)
|
|||
|
||||
// Check if application's organization name and domain are set, fail otherwise
|
||||
// (nowhere to store QSettings to)
|
||||
if (QApplication::organizationName().isEmpty())
|
||||
if (QCoreApplication::organizationName().isEmpty())
|
||||
{
|
||||
qCritical() << "QApplication::organizationName is not set. Please do that.";
|
||||
return false;
|
||||
}
|
||||
if (QApplication::organizationDomain().isEmpty())
|
||||
if (QCoreApplication::organizationDomain().isEmpty())
|
||||
{
|
||||
qCritical() << "QApplication::organizationDomain is not set. Please do that.";
|
||||
return false;
|
||||
}
|
||||
|
||||
// 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.";
|
||||
return false;
|
||||
}
|
||||
|
||||
if (QApplication::applicationVersion().isEmpty())
|
||||
if (QCoreApplication::applicationVersion().isEmpty())
|
||||
{
|
||||
qCritical() << "QApplication::applicationVersion is not set. Please do that.";
|
||||
return false;
|
||||
|
@ -299,7 +299,7 @@ void FvUpdater::startDownloadFeed(const QUrl &url)
|
|||
|
||||
QNetworkRequest request;
|
||||
request.setHeader(QNetworkRequest::ContentTypeHeader, QStringLiteral("application/xml"));
|
||||
request.setHeader(QNetworkRequest::UserAgentHeader, QApplication::applicationName());
|
||||
request.setHeader(QNetworkRequest::UserAgentHeader, QCoreApplication::applicationName());
|
||||
request.setUrl(url);
|
||||
request.setSslConfiguration(QSslConfiguration::defaultConfiguration());
|
||||
|
||||
|
|
Loading…
Reference in New Issue
Block a user