I hit a compilation error on windows (VS2008 sdk, QtCreator) on redef
of ActionAdd & ActionEdit in the corresponding .cpp file.
Commenting these lines in .cpp file worked for me.
const int AccountConfigurationDialog::ActionAdd;
const int AccountConfigurationDialog::ActionEdit;
to me,
static const int ActionAdd = 0;
static const int ActionEdit = 1;
is a good case to be enums rather than const ints coz they are const
and int, no one can modify it, etc.
Is there a certain compiler issues for them being static const ints
rather than enum? Current code as is does not compile on Windows, but
compiled fine on mac (without ppc in pro)
-prakash
> --
> You received this message because you are subscribed to the Google Groups "Qwit" group.
> To post to this group, send email to qw...@googlegroups.com.
> To unsubscribe from this group, send email to qwit+uns...@googlegroups.com.
> For more options, visit this group at http://groups.google.com/group/qwit?hl=en.
>
>
--
Best regards, Artem Iglikov
http://kiwi.kz technical specialist
I do know everything, just not all at once. It's a virtual memory problem.
-prakash
On Mar 3, 5:25 pm, Artem Iglikov <artem.igli...@gmail.com> wrote:
> As I remember, it was successfully compiled on Windows using MinGW
> GCC. But, maybe, you're right and they should be enums...
>
>
>
> On Thu, Mar 4, 2010 at 12:47 AM, Prakash <prakash.na...@gmail.com> wrote:
> > Hi,
>
> > I hit a compilation error on windows (VS2008 sdk, QtCreator) on redef
> > of ActionAdd & ActionEdit in the corresponding .cpp file.
>
> > Commenting these lines in .cpp file worked for me.
> > const int AccountConfigurationDialog::ActionAdd;
> > const int AccountConfigurationDialog::ActionEdit;
>
> > to me,
> > static const int ActionAdd = 0;
> > static const int ActionEdit = 1;
>
> > is a good case to be enums rather than const ints coz they are const
> > and int, no one can modify it, etc.
>
> > Is there a certain compiler issues for them being static const ints
> > rather than enum? Current code as is does not compile on Windows, but
> > compiled fine on mac (without ppc in pro)
>
> > -prakash
>
> > --
> > You received this message because you are subscribed to the Google Groups "Qwit" group.
> > To post to this group, send email to qw...@googlegroups.com.
> > To unsubscribe from this group, send email to qwit+uns...@googlegroups.com.
> > For more options, visit this group athttp://groups.google.com/group/qwit?hl=en.
>
> --
> Best regards, Artem Iglikovhttp://kiwi.kztechnical specialist
> For more options, visit this group at http://groups.google.com/group/qwit?hl=en.
>
>
--
Best regards, Artem Iglikov
http://kiwi.kz technical specialist
public:
- static const int ActionAdd = 0;
- static const int ActionEdit = 1;
+ enum {
+ ActionAdd = 0,
+ ActionEdit = 1
+ };
int action;
int accountId;
Index: C:/qwit/qwit-read-only/src/AccountConfigurationDialog.cpp
===================================================================
--- C:/qwit/qwit-read-only/src/AccountConfigurationDialog.cpp
(revision 305)
+++ C:/qwit/qwit-read-only/src/AccountConfigurationDialog.cpp (working
copy)
@@ -35,9 +35,6 @@
#include "AccountConfigurationDialog.h"
-const int AccountConfigurationDialog::ActionAdd;
-const int AccountConfigurationDialog::ActionEdit;
-
AccountConfigurationDialog::AccountConfigurationDialog(QWidget
*parent): QDialog(parent) {
setupUi(this);
connect(useHttpsCheckBox, SIGNAL(stateChanged(int)), this,
SLOT(useHttpsCheckBoxChanged(int)));
Not sure if it is possible to attach a file to this forum, but here is
the text if you find it useful and pastbin link http://paste.lisp.org/display/95906
-prakash
> For more options, visit this group at http://groups.google.com/group/qwit?hl=en.
>
>
--
Best regards, Artem Iglikov
http://kiwi.kz technical specialist