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:
blacksun
2015-09-16 15:11:13 +00:00
parent 3e1c6b8f56
commit 1a7e3ac8e1
22 changed files with 197 additions and 140 deletions

View File

@@ -16,7 +16,6 @@
along with QElectroTech. If not, see <http://www.gnu.org/licenses/>.
*/
#include "element.h"
#include "qetapp.h"
#include "diagram.h"
#include "conductor.h"
#include "elementtextitem.h"
@@ -89,16 +88,18 @@ void Element::displayHelpLine(bool b)
}
/**
Methode principale de dessin de l'element
@param painter Le QPainter utilise pour dessiner l'elment
@param options Les options de style a prendre en compte
@param widget Le widget sur lequel on dessine
*/
void Element::paint(QPainter *painter, const QStyleOptionGraphicsItem *options, QWidget *widget) {
* @brief Element::paint
* @param painter
* @param options
* @param widget
*/
void Element::paint(QPainter *painter, const QStyleOptionGraphicsItem *options, QWidget *widget)
{
#ifndef Q_OS_WIN
// corrige un bug de rendu ne se produisant que lors du rendu sur QGraphicsScene sous X11 au zoom par defaut
static bool must_correct_rendering_bug = QETApp::settings().value("correct-rendering", false).toBool();
//Fix visual bug on QGraphicsScene that occur only on X11 with default zoom.
QSettings settings;
static bool must_correct_rendering_bug = settings.value("correct-rendering", false).toBool();
if (must_correct_rendering_bug) {
Diagram *dia = diagram();
if (dia && options -> levelOfDetail == 1.0 && widget) {