mirror of
https://github.com/qelectrotech/qelectrotech-source-mirror.git
synced 2025-12-24 03:10:52 +01:00
Fix warning about QSettings: now QSettings use native format for windows osx and other unix. See Qt documentation for more information.
http://doc.qt.io/qt-5/qsettings.html#details git-svn-id: svn+ssh://svn.tuxfamily.org/svnroot/qet/qet/trunk@4206 bfdf4180-ca20-0410-9c96-a3a8aa849046
This commit is contained in:
@@ -467,8 +467,9 @@ void QETTitleBlockTemplateEditor::initToolbars() {
|
||||
/**
|
||||
Initialize layouts and widgets
|
||||
*/
|
||||
void QETTitleBlockTemplateEditor::initWidgets() {
|
||||
QSettings &settings = QETApp::settings();
|
||||
void QETTitleBlockTemplateEditor::initWidgets()
|
||||
{
|
||||
QSettings settings;
|
||||
|
||||
// undo list on the right
|
||||
undo_stack_ = new QUndoStack(this);
|
||||
@@ -579,10 +580,12 @@ QString QETTitleBlockTemplateEditor::currentlyEditedTitle() const {
|
||||
}
|
||||
|
||||
/**
|
||||
Load template editor-related parameters.
|
||||
*/
|
||||
void QETTitleBlockTemplateEditor::readSettings() {
|
||||
QSettings &settings = QETApp::settings();
|
||||
* @brief QETTitleBlockTemplateEditor::readSettings
|
||||
* Read settings
|
||||
*/
|
||||
void QETTitleBlockTemplateEditor::readSettings()
|
||||
{
|
||||
QSettings settings;
|
||||
|
||||
// window size and position
|
||||
QVariant geometry = settings.value("titleblocktemplateeditor/geometry");
|
||||
@@ -594,10 +597,12 @@ void QETTitleBlockTemplateEditor::readSettings() {
|
||||
}
|
||||
|
||||
/**
|
||||
Save template editor-related parameters.
|
||||
*/
|
||||
void QETTitleBlockTemplateEditor::writeSettings() {
|
||||
QSettings &settings = QETApp::settings();
|
||||
* @brief QETTitleBlockTemplateEditor::writeSettings
|
||||
* Write the settings
|
||||
*/
|
||||
void QETTitleBlockTemplateEditor::writeSettings()
|
||||
{
|
||||
QSettings settings;
|
||||
settings.setValue("titleblocktemplateeditor/geometry", saveGeometry());
|
||||
settings.setValue("titleblocktemplateeditor/state", saveState());
|
||||
}
|
||||
@@ -898,13 +903,16 @@ void QETTitleBlockTemplateEditor::quit() {
|
||||
}
|
||||
|
||||
/**
|
||||
Save the new preview width to application settings
|
||||
@param former_preview_width Unused, former preview width
|
||||
@param new_preview_width New preview width
|
||||
*/
|
||||
void QETTitleBlockTemplateEditor::savePreviewWidthToApplicationSettings(int former_preview_width, int new_preview_width) {
|
||||
* @brief QETTitleBlockTemplateEditor::savePreviewWidthToApplicationSettings
|
||||
* Save the new preview width to application settings
|
||||
* @param former_preview_width : former_preview_width Unused, former preview width
|
||||
* @param new_preview_width : new_preview_width New preview width
|
||||
*/
|
||||
void QETTitleBlockTemplateEditor::savePreviewWidthToApplicationSettings(int former_preview_width, int new_preview_width)
|
||||
{
|
||||
Q_UNUSED(former_preview_width)
|
||||
QETApp::settings().setValue("titleblocktemplateeditor/preview_width", new_preview_width);
|
||||
QSettings settings;
|
||||
settings.setValue("titleblocktemplateeditor/preview_width", new_preview_width);
|
||||
}
|
||||
|
||||
/**
|
||||
|
||||
Reference in New Issue
Block a user