From 3d60c9e4a5cd66aa2088356fa45062ed11ccacfa Mon Sep 17 00:00:00 2001 From: Mark Liversedge Date: Tue, 8 Jan 2013 19:02:15 +0000 Subject: [PATCH] Fix conflict with Qwtplot3d The struct Appearance conflicts with a class in the QWT3D namespace. So renamed it. Fixes a compile time error. --- src/Colors.cpp | 4 ++-- src/Colors.h | 6 +++--- src/MainWindow.cpp | 2 +- 3 files changed, 6 insertions(+), 6 deletions(-) diff --git a/src/Colors.cpp b/src/Colors.cpp index 930d60185..860f1f648 100644 --- a/src/Colors.cpp +++ b/src/Colors.cpp @@ -109,7 +109,7 @@ void GCColor::setupColors() } // default settings for fonts etc -struct Appearance defaultAppearance[] ={ +struct SizeSettings defaultAppearance[] ={ // small screens include netbooks and old vga 800x600, 1024x768 { 1024, 768, 8,8,8,8,8,8, 800, 600 }, @@ -126,7 +126,7 @@ struct Appearance defaultAppearance[] ={ { 0,0,0,0,0,0,0,0,0,0 }, }; -struct Appearance +struct SizeSettings GCColor::defaultSizes(int width, int height) { for (int i=0; defaultAppearance[i].maxheight; i++) { diff --git a/src/Colors.h b/src/Colors.h index 550183594..83143180e 100644 --- a/src/Colors.h +++ b/src/Colors.h @@ -27,7 +27,7 @@ class MainWindow; // set appearace defaults based upon screen size -struct Appearance { +struct SizeSettings { // this applies up to the following geometry int maxheight, @@ -46,7 +46,7 @@ struct Appearance { height; }; -extern Appearance defaultAppearance[]; +extern SizeSettings defaultAppearance[]; struct Colors { QString name, @@ -67,7 +67,7 @@ class GCColor : public QObject static const Colors *defaultColorSet(); static void resetColors(); static QColor invert(QColor); - static struct Appearance defaultSizes(int width, int height); + static struct SizeSettings defaultSizes(int width, int height); public slots: void readConfig(); diff --git a/src/MainWindow.cpp b/src/MainWindow.cpp index 1b2373632..4028383b6 100644 --- a/src/MainWindow.cpp +++ b/src/MainWindow.cpp @@ -170,7 +170,7 @@ MainWindow::MainWindow(const QDir &home) : // first run -- lets set some sensible defaults... // lets put it in the middle of screen 1 QRect size = desktop->availableGeometry(); - struct Appearance app = GCColor::defaultSizes(size.height(), size.width()); + struct SizeSettings app = GCColor::defaultSizes(size.height(), size.width()); // center on the available screen (minus toolbar/sidebar) move((size.width()-size.x())/2 - app.width/2,