Support compile mingw32

This commit is contained in:
lsv 2025-09-23 16:17:07 +05:00
parent cc47a8ef7b
commit e65781aa65
32 changed files with 225 additions and 128 deletions

View file

@ -232,7 +232,7 @@ public:
}
if (k.size() > 0) {
key3 kk = k.at(r);
if ((col == 0)) {
if (col == 0) {
long ttmp = kk.pid;
if (kk.sum > 0) val = wxString::Format("*%ld", ttmp); // backend
else
@ -283,7 +283,13 @@ public:
{
return false;
}
unsigned GetRow(const wxDataViewItem& item) const wxOVERRIDE { return (unsigned long)item.GetID() - 1; } // 0 row = header
unsigned int GetRow(const wxDataViewItem& item) const wxOVERRIDE {
unsigned int i;
// wxUIntToPtr()
i=wxPtrToUInt(item.GetID());
i=i-1;
return i;
} // 0 row = header
unsigned int GetColumnCount() const wxOVERRIDE { return 0; }
wxString GetColumnType(unsigned int) const wxOVERRIDE { return ""; }
@ -449,7 +455,7 @@ public:
Bind(wxEVT_DATAVIEW_ITEM_ACTIVATED, [&](wxDataViewEvent& event) {
int col = event.GetColumn();
wxDataViewItem item(event.GetItem());
long row = (long)item.GetID();
long row = wxPtrToUInt(item.GetID());
row--;
if (col == 1) //qid
{
@ -544,7 +550,7 @@ public:
MyIndexListModel* m = static_cast<MyIndexListModel*>(GetModel());
wxDataViewItem item(GetCurrentItem());
long row = (long)item.GetID();
long row = wxPtrToUInt(item.GetID());
if (!(row < m->GetCount())) row = 0;
while (row != -1 && row < m->GetCount()) {
@ -599,7 +605,7 @@ public:
HitTest(mc, item, column);
if (item != NULL && column != NULL)
{
int row = (long)item.GetID() - 1;
int row = wxPtrToUInt(item.GetID()) - 1;
int ncol = column->GetModelColumn();
if (row >= 0) {
if (column && column->GetModelColumn() == 2) {

View file

@ -22,6 +22,7 @@
// wxAUI
#include <wx/aui/aui.h>
#include "schema/pgServer.h"
#include "dlg/dlgClasses.h"
#include "utils/factory.h"
#include "ctl/ctlAuiNotebook.h"
@ -90,7 +91,7 @@ class MywxAuiDefaultTabArt : public wxAuiDefaultTabArt
{
public:
MywxAuiDefaultTabArt() :wxAuiDefaultTabArt(){};
MywxAuiDefaultTabArt* Clone() {
MywxAuiDefaultTabArt* Clone() wxOVERRIDE {
return new MywxAuiDefaultTabArt(*this);
}
virtual void DrawTab(wxDC& dc,

View file

@ -27,7 +27,7 @@
#include "frm/frmLog.h"
#include "ctl/ctlGitPanel.h"
#include "ctl/ctlShortCut.h"
#include "utils/FunctionPGHelper.h";
#include "utils/FunctionPGHelper.h"
//
// This number MUST be incremented if changing any of the default perspectives
//

View file

@ -11,8 +11,6 @@
#ifndef PGADMIN3_H
#define PGADMIN3_H
#include "../utils/diff_match_patch.h"
#include "utils/FormatterSQL.h"
// wxWindows headers
#include <wx/wx.h>
@ -20,6 +18,8 @@
#include <wx/colordlg.h>
#include <wx/listctrl.h>
#include <wx/xrc/xmlres.h>
#include "../utils/diff_match_patch.h"
#include "utils/FormatterSQL.h"
#ifdef WIN32
#include <winsock2.h>
@ -167,8 +167,8 @@ WX_DECLARE_STRING_HASH_MAP(wxString, cacheMap);
class pgAdmin3 : public wxApp
{
public:
virtual bool OnInit();
virtual int OnExit();
virtual bool OnInit() wxOVERRIDE;
virtual int OnExit() wxOVERRIDE;
virtual void OnFatalException() wxOVERRIDE;
#ifdef __WXMAC__
void MacOpenFile(const wxString &fileName);

View file

@ -11,7 +11,7 @@
#ifdef WX_PRECOMP
#ifdef __cplusplus
#include <wx/wxprec.h>
#include "copyright.h"
#include "pgAdmin3.h"
#include "version.h"

View file

@ -13,7 +13,7 @@
#define PGPROJOB_H
#include "schema/pgServer.h"
#include "schema/pgDatabase.h"
class pgproJobFactory : public pgDatabaseObjFactory
{

View file

@ -107,6 +107,7 @@ bool StrToBool(const wxString &value); // english
long StrToLong(const wxString &value);
double StrToDouble(const wxString &value);
wxLongLong StrToLongLong(const wxString &value);
long long StrTolonglong(const wxString &value);
wxDateTime StrToDateTime(const wxString &value);
OID StrToOid(const wxString &value);
@ -115,6 +116,7 @@ wxString generate_spaces(int length);
// nls aware
wxString BoolToYesNo(bool value);
wxString NumToStr(long value);
wxString NumToStr(long long value);
wxString NumToStr(double value);
wxString NumToStrHuman(wxLongLong value);
wxString NumToStr(OID value);