Обсуждение: SVN Commit by andreas: r4171 - in trunk/pgadmin3/src: . base ctl include/base
SVN Commit by andreas: r4171 - in trunk/pgadmin3/src: . base ctl include/base
От
svn@pgadmin.org
Дата:
Author: andreas
Date: 2005-05-09 01:12:52 +0100 (Mon, 09 May 2005)
New Revision: 4171
Modified:
trunk/pgadmin3/src/Makefile.am
trunk/pgadmin3/src/base/pgSetBase.cpp
trunk/pgadmin3/src/ctl/explainCanvas.cpp
trunk/pgadmin3/src/include/base/pgSetBase.h
Log:
gcc fixes
Modified: trunk/pgadmin3/src/Makefile.am
===================================================================
--- trunk/pgadmin3/src/Makefile.am 2005-05-08 23:29:06 UTC (rev 4170)
+++ trunk/pgadmin3/src/Makefile.am 2005-05-09 00:12:52 UTC (rev 4171)
@@ -79,8 +79,13 @@
noinst_HEADERS = \
$(srcdir)/include/base/base.h $(srcdir)/include/base/appbase.h $(srcdir)/include/base/sysLogger.h \
$(srcdir)/include/base/pgDefs.h $(srcdir)/include/base/pgConnBase.h $(srcdir)/include/base/pgSetBase.h \
-$(srcdir)/include/copyright.h $(srcdir)/include/version.h $(srcdir)/include/ctlSQLBox.h \
-$(srcdir)/include/ctlSQLResult.h $(srcdir)/include/ctlListView.h \
+$(srcdir)/include/copyright.h $(srcdir)/include/version.h\
+\
+$(srcdir)/include/ctl/ctlSQLBox.h $(srcdir)/include/ctl/ctlSQLResult.h \
+$(srcdir)/include/ctl/ctlListView.h $(srcdir)/include/ctl/calbox.h \
+$(srcdir)/include/ctl/timespin.h $(srcdir)/include/ctl/ctlComboBox.h \
+$(srcdir)/include/ctl/xh_timespin.h $(srcdir)/include/ctl/xh_calb.h $(srcdir)/include/ctl/xh_sqlbox.h \
+$(srcdir)/include/ctl/xh_ctlcombo.h \
$(srcdir)/include/parser/parse.h $(srcdir)/include/parser/keywords.h $(srcdir)/include/nodes/parsenodes.h \
$(srcdir)/include/postgres.h $(srcdir)/include/pgDefs.h $(srcdir)/include/pgDatatype.h \
$(srcdir)/include/ctlSecurityPanel.h $(srcdir)/include/dlgClasses.h $(srcdir)/include/frmGrantWizard.h \
@@ -113,8 +118,6 @@
$(srcdir)/include/pgServer.h $(srcdir)/include/pgSet.h $(srcdir)/include/pgTable.h \
$(srcdir)/include/pgTrigger.h $(srcdir)/include/pgType.h $(srcdir)/include/pgUser.h \
$(srcdir)/include/pgView.h $(srcdir)/include/sysLogger.h $(srcdir)/include/utffile.h \
-$(srcdir)/include/calbox.h $(srcdir)/include/timespin.h $(srcdir)/include/ctlComboBox.h \
-$(srcdir)/include/xh_timespin.h $(srcdir)/include/xh_calb.h $(srcdir)/include/xh_sqlbox.h
$(srcdir)/include/xh_ctlcombo.h\
$(srcdir)/include/sysSettings.h $(srcdir)/include/sysProcess.h $(srcdir)/include/wxgridsel.h $(srcdir)/include/menu.h\
$(srcdir)/include/pgconfig.h $(srcdir)/include/update.h $(srcdir)/include/frmUpdate.h \
$(srcdir)/include/dlgHbaConfig.h $(srcdir)/include/dlgMainConfig.h $(srcdir)/include/frmHint.h \
Modified: trunk/pgadmin3/src/base/pgSetBase.cpp
===================================================================
--- trunk/pgadmin3/src/base/pgSetBase.cpp 2005-05-08 23:29:06 UTC (rev 4170)
+++ trunk/pgadmin3/src/base/pgSetBase.cpp 2005-05-09 00:12:52 UTC (rev 4171)
@@ -182,7 +182,7 @@
}
-long pgSetBase::GetLong(const wxString &col)
+long pgSetBase::GetLong(const wxString &col) const
{
char *c=PQgetvalue(res, pos-1, ColNumber(col));
if (c)
@@ -290,6 +290,13 @@
//////////////////////////////////////////////////////////////////
+pgSetIterator::pgSetIterator(pgConnBase *conn, const wxString &qry)
+{
+ set=conn->ExecuteSet(qry);
+ first=true;
+}
+
+
pgSetIterator::pgSetIterator(pgSetBase *s)
{
set=s;
Modified: trunk/pgadmin3/src/ctl/explainCanvas.cpp
===================================================================
--- trunk/pgadmin3/src/ctl/explainCanvas.cpp 2005-05-08 23:29:06 UTC (rev 4170)
+++ trunk/pgadmin3/src/ctl/explainCanvas.cpp 2005-05-09 00:12:52 UTC (rev 4171)
@@ -91,10 +91,10 @@
}
- int x0 = rootShape->GetWidth()*3;
- int y0 = rootShape->GetHeight()*3/2;
- int xoffs = rootShape->GetWidth()*3;
- int yoffs = rootShape->GetHeight()*5/4;
+ int x0 = (int)(rootShape->GetWidth()*3);
+ int y0 = (int)(rootShape->GetHeight()*3/2);
+ int xoffs = (int)(rootShape->GetWidth()*3);
+ int yoffs = (int)(rootShape->GetHeight()*5/4);
wxNode *current = GetDiagram()->GetShapeList()->GetFirst();
while (current)
@@ -144,7 +144,7 @@
void ExplainCanvas::ShowPopup(ExplainShape *s)
{
int sx, sy;
- CalcScrolledPosition(s->GetX(), s->GetY(), &sx, &sy);
+ CalcScrolledPosition((int)s->GetX(), (int)s->GetY(), &sx, &sy);
popup->SetShape(s);
@@ -304,4 +304,4 @@
wxDialog::Hide();
}
}
-}
\ No newline at end of file
+}
Modified: trunk/pgadmin3/src/include/base/pgSetBase.h
===================================================================
--- trunk/pgadmin3/src/include/base/pgSetBase.h 2005-05-08 23:29:06 UTC (rev 4170)
+++ trunk/pgadmin3/src/include/base/pgSetBase.h 2005-05-09 00:12:52 UTC (rev 4171)
@@ -66,7 +66,7 @@
wxString GetVal(const int col) const;
wxString GetVal(const wxString& col) const;
long GetLong(const int col) const;
- long GetLong(const wxString &col);
+ long GetLong(const wxString &col) const;
bool GetBool(const int col) const;
bool GetBool(const wxString &col) const;
double GetDouble(const int col) const;
@@ -99,15 +99,17 @@
{
public:
pgSetIterator(pgSetBase *s);
+ pgSetIterator(pgConnBase *conn, const wxString &sql);
~pgSetIterator();
bool RowsLeft();
+ bool IsValid() { return set != 0; }
pgSetBase *Set() { return set; }
wxString GetVal(const int col) const { return set->GetVal(col); }
wxString GetVal(const wxString& col) const { return set->GetVal(col); }
long GetLong(const int col) const { return set->GetLong(col); }
- long GetLong(const wxString &col) { return set->GetLong(col); }
+ long GetLong(const wxString &col) const { return set->GetLong(col); }
bool GetBool(const int col) const { return set->GetBool(col); }
bool GetBool(const wxString &col) const { return set->GetBool(col); }
double GetDouble(const int col) const { return set->GetDouble(col); }
Re: SVN Commit by andreas: r4171 - in trunk/pgadmin3/src: . base ctl include/base
От
"Dave Page"
Дата:
> -----Original Message-----
> From: pgadmin-hackers-owner@postgresql.org
> [mailto:pgadmin-hackers-owner@postgresql.org] On Behalf Of
> svn@pgadmin.org
> Sent: 09 May 2005 01:13
> To: pgadmin-hackers@postgresql.org
> Subject: [pgadmin-hackers] SVN Commit by andreas: r4171 - in
> trunk/pgadmin3/src: . base ctl include/base
>
> Author: andreas
> Date: 2005-05-09 01:12:52 +0100 (Mon, 09 May 2005)
> New Revision: 4171
>
> Modified:
> trunk/pgadmin3/src/Makefile.am
> trunk/pgadmin3/src/base/pgSetBase.cpp
> trunk/pgadmin3/src/ctl/explainCanvas.cpp
> trunk/pgadmin3/src/include/base/pgSetBase.h
> Log:
> gcc fixes
Hmm, looks like this had an unfortunate side effect:
make[2]: Entering directory `/usr/local/src/pgadmin3/src'
if g++ -DHAVE_CONFIG_H -I. -I. -I.. -DDATA_DIR=\"/usr/share/pgadmin3/\"
-Wall -g -I../src/include -I../src/agent/include -I../src/slony/include
-I/usr/local/pgsql/include -DSSL
-I/usr/local/lib/wx/include/gtk2-unicode-debug-static-2.6
-I/usr/local/include/wx-2.6 -D__WXDEBUG__ -D__WXGTK__
-D_FILE_OFFSET_BITS=64 -D_LARGE_FILES -D_LARGEFILE_SOURCE=1
-I/usr/local//include/wx-2.6 -DDATA_DIR=\"/usr/share/pgadmin3/\" -Wall
-g -I../src/include -I../src/agent/include -I../src/slony/include -Wall
-g -O0 -MT pgAdmin3.o -MD -MP -MF ".deps/pgAdmin3.Tpo" -c -o pgAdmin3.o
`test -f './pgAdmin3.cpp' || echo './'`./pgAdmin3.cpp; \
then mv -f ".deps/pgAdmin3.Tpo" ".deps/pgAdmin3.Po"; else rm -f
".deps/pgAdmin3.Tpo"; exit 1; fi
In file included from ../src/include/pgSet.h:14,
from ../src/include/pgConn.h:23,
from ../src/include/pgServer.h:20,
from ../src/include/frmMain.h:25,
from pgAdmin3.cpp:47:
../src/include/base/pgSetBase.h: In member function `long int
pgSetIterator::GetLong(int) const':
../src/include/base/pgSetBase.h:109: error: ISO C++ says that `long int
pgSetBase::GetLong(int) const' and `long int pgSetBase::GetLong(const
wxString&)' are ambiguous even though the worst conversion for the
former is
better than the worst conversion for the latter
make[2]: *** [pgAdmin3.o] Error 1
make[2]: Leaving directory `/usr/local/src/pgadmin3/src'
make[1]: *** [all-recursive] Error 1
make[1]: Leaving directory `/usr/local/src/pgadmin3'
make: *** [all] Error 2
Regards, Dave
Dave Page wrote: > Hmm, looks like this had an unfortunate side effect: > ../src/include/base/pgSetBase.h: In member function `long int > pgSetIterator::GetLong(int) const': > ../src/include/base/pgSetBase.h:109: error: ISO C++ says that `long int > pgSetBase::GetLong(int) const' and `long int pgSetBase::GetLong(const > > wxString&)' are ambiguous even though the worst conversion for the > former is > better than the worst conversion for the latter I got this message *before* 4171, and from the errmsg I can see that you didn't svn update :-) Regards, Andreas
Re: SVN Commit by andreas: r4171 - in trunk/pgadmin3/src: . base ctl include/base
От
"Dave Page"
Дата:
> -----Original Message----- > From: Andreas Pflug [mailto:pgadmin@pse-consulting.de] > Sent: 09 May 2005 10:36 > To: Dave Page > Cc: pgadmin-hackers@postgresql.org > Subject: Re: [pgadmin-hackers] SVN Commit by andreas: r4171 - > in trunk/pgadmin3/src: . base ctl include/base > > Dave Page wrote: > > Hmm, looks like this had an unfortunate side effect: > > ../src/include/base/pgSetBase.h: In member function `long int > > pgSetIterator::GetLong(int) const': > > ../src/include/base/pgSetBase.h:109: error: ISO C++ says > that `long int > > pgSetBase::GetLong(int) const' and `long int > pgSetBase::GetLong(const > > > > wxString&)' are ambiguous even though the worst > conversion for the > > former is > > better than the worst conversion for the latter > > I got this message *before* 4171, and from the errmsg I can > see that you > didn't svn update :-) That's the automated test build - the first thing it does is delete the entire tree and checkout a fresh copy! But then I grant you that your commit was after the build :-) Sorry for the noise... /D