Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with
or
.
Download ZIP
Browse files

pgModeler now shows the startup exception in a message box beside on

stdin.
  • Loading branch information...
commit e1db7a91ae21930331e383886aea8d8e05d08d49 1 parent 1108c64
@rkhaotix rkhaotix authored
View
15 libconexbd/libconexbd.pro
@@ -1,11 +1,10 @@
-contains(BUILDCONF, shared) {
- include(../pgmodeler.pro)
- TEMPLATE = lib
- TARGET = conexbd
- DESTDIR = ../build/lib
- OBJECTS_DIR = obj
- LIBS += $$DESTDIR/$$LIBUTIL
-}
+include(../pgmodeler.pro)
+
+TEMPLATE = lib
+TARGET = conexbd
+DESTDIR = ../build/lib
+OBJECTS_DIR = obj
+LIBS += $$DESTDIR/$$LIBUTIL
HEADERS += $$PWD/src/conexaobd.h \
$$PWD/src/resultado.h
View
17 libobjrenderer/libobjrenderer.pro
@@ -1,12 +1,11 @@
-contains(BUILDCONF, shared) {
- include(../pgmodeler.pro)
- TEMPLATE = lib
- TARGET = objrenderer
- DESTDIR = ../build/lib
- LIBS += $$DESTDIR/$$LIBUTIL \
- $$DESTDIR/$$LIBPARSERS \
- $$DESTDIR/$$LIBPGMODELER
-}
+include(../pgmodeler.pro)
+
+TEMPLATE = lib
+TARGET = objrenderer
+DESTDIR = ../build/lib
+LIBS += $$DESTDIR/$$LIBUTIL \
+ $$DESTDIR/$$LIBPARSERS \
+ $$DESTDIR/$$LIBPGMODELER
HEADERS += $$PWD/src/objetografico.h \
$$PWD/src/ogcaixatexto.h \
View
13 libparsers/libparsers.pro
@@ -1,10 +1,9 @@
-contains(BUILDCONF, shared) {
- include(../pgmodeler.pro)
- TEMPLATE = lib
- TARGET = parsers
- DESTDIR = ../build/lib
- LIBS += $$DESTDIR/$$LIBUTIL
-}
+include(../pgmodeler.pro)
+
+TEMPLATE = lib
+TARGET = parsers
+DESTDIR = ../build/lib
+LIBS += $$DESTDIR/$$LIBUTIL
HEADERS += $$PWD/src/parseresquema.h \
$$PWD/src/parserxml.h
View
16 libpgmodeler/libpgmodeler.pro
@@ -1,11 +1,11 @@
-contains(BUILDCONF, shared) {
- include(../pgmodeler.pro)
- TEMPLATE = lib
- TARGET = pgmodeler
- DESTDIR = ../build/lib
- LIBS += $$DESTDIR/$$LIBUTIL \
- $$DESTDIR/$$LIBPARSERS
-}
+include(../pgmodeler.pro)
+
+TEMPLATE = lib
+TARGET = pgmodeler
+DESTDIR = ../build/lib
+
+LIBS += $$DESTDIR/$$LIBUTIL \
+ $$DESTDIR/$$LIBPARSERS
HEADERS += $$PWD/src/caixatexto.h \
$$PWD/src/conversaotipo.h \
View
22 libpgmodeler_ui/libpgmodeler_ui.pro
@@ -1,14 +1,14 @@
-contains(BUILDCONF, shared) {
- include(../pgmodeler.pro)
- TEMPLATE = lib
- TARGET = pgmodeler_ui
- DESTDIR = ../build/lib
- LIBS = $$DESTDIR/$$LIBUTIL \
- $$DESTDIR/$$LIBPARSERS \
- $$DESTDIR/$$LIBCONEXBD \
- $$DESTDIR/$$LIBOBJRENDERER \
- $$DESTDIR/$$LIBPGMODELER
-}
+include(../pgmodeler.pro)
+
+TEMPLATE = lib
+TARGET = pgmodeler_ui
+DESTDIR = ../build/lib
+
+LIBS = $$DESTDIR/$$LIBUTIL \
+ $$DESTDIR/$$LIBPARSERS \
+ $$DESTDIR/$$LIBCONEXBD \
+ $$DESTDIR/$$LIBOBJRENDERER \
+ $$DESTDIR/$$LIBPGMODELER
RESOURCES += $$PWD/res/resources.qrc
windows:RCC_DIR += $$PWD/src
View
86 libpgmodeler_ui/src/formprincipal.cpp
@@ -95,46 +95,54 @@ FormPrincipal::FormPrincipal(QWidget *parent, Qt::WindowFlags flags) : QMainWind
setupUi(this);
//Alocando os formulários globais
- fsobre=new FormSobre;
caixa_msg=new CaixaMensagem(this, (Qt::WindowTitleHint | Qt::WindowSystemMenuHint));
- fconfiguracao=new FormConfiguracao(this);
- fexportacao=new FormExportacao(this);
-
- lista_oper=new ListaOperacoesWidget;
- visao_objs=new VisaoObjetosWidget;
- selecaoobjetos_wgt=new VisaoObjetosWidget(true);
-
-
- //*** CRIAÇÃO DOS FORMULÁRIOS GLOBAIS ***
- permissao_wgt=new PermissaoWidget(this);
- codigofonte_wgt=new CodigoFonteWidget(this);
- caixatexto_wgt=new CaixaTextoWidget(this);
- bancodados_wgt=new BancoDadosWidget(this);
- esquema_wgt=new EsquemaWidget(this);
- papel_wgt=new PapelWidget(this);
- espacotabela_wgt=new EspacoTabelaWidget(this);
- linguagem_wgt=new LinguagemWidget(this);
- parametro_wgt=new ParametroWidget(this);
- funcao_wgt=new FuncaoWidget(this);
- convtipo_wgt=new ConversaoTipoWidget(this);
- convcodif_wgt=new ConversaoCodificacaoWidget(this);
- dominio_wgt=new DominioWidget(this);
- funcaoag_wgt=new FuncaoAgregacaoWidget(this);
- sequencia_wgt=new SequenciaWidget(this);
- operador_wgt=new OperadorWidget(this);
- familiaop_wgt=new FamiliaOperadoresWidget(this);
- classeop_wgt=new ClasseOperadoresWidget(this);
- tipo_wgt=new TipoWidget(this);
- visao_wgt=new VisaoWidget(this);
- coluna_wgt=new ColunaWidget(this);
- restricao_wgt=new RestricaoWidget(this);
- regra_wgt=new RegraWidget(this);
- gatilho_wgt=new GatilhoWidget(this);
- indice_wgt=new IndiceWidget(this);
- relacao_wgt=new RelacionamentoWidget(this);
- tabela_wgt=new TabelaWidget(this);
- prog_tarefa=new ProgressoTarefa();
- deps_refs_wgt=new ListaObjetosWidget(this);
+
+ try
+ {
+ fsobre=new FormSobre;
+ fconfiguracao=new FormConfiguracao(this);
+ fexportacao=new FormExportacao(this);
+
+ lista_oper=new ListaOperacoesWidget;
+ visao_objs=new VisaoObjetosWidget;
+ selecaoobjetos_wgt=new VisaoObjetosWidget(true);
+
+
+ //*** CRIAÇÃO DOS FORMULÁRIOS GLOBAIS ***
+ permissao_wgt=new PermissaoWidget(this);
+ codigofonte_wgt=new CodigoFonteWidget(this);
+ caixatexto_wgt=new CaixaTextoWidget(this);
+ bancodados_wgt=new BancoDadosWidget(this);
+ esquema_wgt=new EsquemaWidget(this);
+ papel_wgt=new PapelWidget(this);
+ espacotabela_wgt=new EspacoTabelaWidget(this);
+ linguagem_wgt=new LinguagemWidget(this);
+ parametro_wgt=new ParametroWidget(this);
+ funcao_wgt=new FuncaoWidget(this);
+ convtipo_wgt=new ConversaoTipoWidget(this);
+ convcodif_wgt=new ConversaoCodificacaoWidget(this);
+ dominio_wgt=new DominioWidget(this);
+ funcaoag_wgt=new FuncaoAgregacaoWidget(this);
+ sequencia_wgt=new SequenciaWidget(this);
+ operador_wgt=new OperadorWidget(this);
+ familiaop_wgt=new FamiliaOperadoresWidget(this);
+ classeop_wgt=new ClasseOperadoresWidget(this);
+ tipo_wgt=new TipoWidget(this);
+ visao_wgt=new VisaoWidget(this);
+ coluna_wgt=new ColunaWidget(this);
+ restricao_wgt=new RestricaoWidget(this);
+ regra_wgt=new RegraWidget(this);
+ gatilho_wgt=new GatilhoWidget(this);
+ indice_wgt=new IndiceWidget(this);
+ relacao_wgt=new RelacionamentoWidget(this);
+ tabela_wgt=new TabelaWidget(this);
+ prog_tarefa=new ProgressoTarefa();
+ deps_refs_wgt=new ListaObjetosWidget(this);
+ }
+ catch(Excecao &e)
+ {
+ caixa_msg->show(e);
+ }
for(unsigned i=0; i < 27; i++)
prog_tarefa->adicionarIcone(tipos[i],
View
11 libutil/libutil.pro
@@ -1,9 +1,8 @@
-contains(BUILDCONF, shared) {
- include(../pgmodeler.pro)
- TEMPLATE = lib
- TARGET = util
- DESTDIR = ../build/lib
-}
+include(../pgmodeler.pro)
+
+TEMPLATE = lib
+TARGET = util
+DESTDIR = ../build/lib
HEADERS += $$PWD/src/excecao.h \
$$PWD/src/atributosglobais.h \
View
27 main/main.pro
@@ -4,27 +4,12 @@ TEMPLATE = app
TARGET = pgmodeler
DESTDIR = ../build
-contains(BUILDCONF, static) {
- include(../libutil/libutil.pro)
- include(../libparsers/libparsers.pro)
- include(../libconexbd/libconexbd.pro)
- include(../libpgmodeler/libpgmodeler.pro)
- include(../libobjrenderer/libobjrenderer.pro)
- include(../libpgmodeler_ui/libpgmodeler_ui.pro)
- INCLUDEPATH = $$unique(INCLUDEPATH)
-}
-
-contains(BUILDCONF, shared) {
- LIBS += $$DESTDIR/lib/$$LIBUTIL \
- $$DESTDIR/lib/$$LIBPARSERS \
- $$DESTDIR/lib/$$LIBCONEXBD \
- $$DESTDIR/lib/$$LIBOBJRENDERER \
- $$DESTDIR/lib/$$LIBPGMODELER \
- $$DESTDIR/lib/$$LIBPGMODELERUI
-}
+LIBS += $$DESTDIR/lib/$$LIBUTIL \
+ $$DESTDIR/lib/$$LIBPARSERS \
+ $$DESTDIR/lib/$$LIBCONEXBD \
+ $$DESTDIR/lib/$$LIBOBJRENDERER \
+ $$DESTDIR/lib/$$LIBPGMODELER \
+ $$DESTDIR/lib/$$LIBPGMODELERUI
HEADERS += $$PWD/src/aplicacao.h
SOURCES += $$PWD/src/main.cpp
-
-message("** Building configuration: [$$BUILDCONF] **")
-message("** Type 'make' to start build. **")
View
19 main/src/main.cpp
@@ -61,25 +61,6 @@ int main(int argc, char **argv)
//Caso um erro seja capturado durante a inicialização da aplicação
catch(Excecao &e)
{
- deque<Excecao> excecoes;
- deque<Excecao>::iterator itr, itr_end;
- unsigned idx=0;
-
- //Obtém a lista de exceções geradas
- e.obterListaExcecoes(excecoes);
- itr=excecoes.begin();
- itr_end=excecoes.end();
-
- //Exibe todas as exceções no console
- while(itr!=itr_end)
- {
- cout << "[" << idx << "] " << itr->obterArquivo().toStdString() << " (" << itr->obterLinha().toStdString() << ")" << endl;
- cout << " " << itr->obterLocal().toStdString() << endl;
- cout << " [" << Excecao::obterNomeErro(itr->obterTipoErro()).toStdString() << "] ";
- cout << itr->obterMensagemErro().toStdString() << endl << endl;
- itr++; idx++;
- }
-
//Retorna o código de erro da última exceção e aborta a aplicação
return(e.obterTipoErro());
}
View
35 pgmodeler.pro
@@ -1,8 +1,4 @@
-CONFIG += ordered qt stl rtti exceptions
-
-contains(CONFIG, debug) {
- CONFIG += warn_on
-}
+CONFIG += ordered qt stl rtti exceptions warn_on
unix: CONFIG += link_pkgconfig
unix: PKGCONFIG += libxml-2.0 libpq
@@ -12,23 +8,14 @@ unix:LIB_PREFIX = lib
unix:LIB_EXT = so
windows:LIB_EXT = dll
-isEmpty(BUILDCONF): BUILDCONF += shared
-
-contains(BUILDCONF, shared) {
- SUBDIRS = libutil \
- libparsers \
- libconexbd \
- libpgmodeler \
- libobjrenderer \
- libpgmodeler_ui \
- main \
- plugins/dummyplugin
-}
-
-contains(BUILDCONF, static) {
- SUBDIRS = main
- #plugins/dummyplugin
-}
+SUBDIRS = libutil \
+ libparsers \
+ libconexbd \
+ libpgmodeler \
+ libobjrenderer \
+ libpgmodeler_ui \
+ main # \
+ #plugins/dummyplugin
LIBUTIL=$${LIB_PREFIX}util.$${LIB_EXT}
@@ -52,8 +39,8 @@ INCLUDEPATH += $$PWD/libutil/src \
$$PWD/libpgmodeler_ui/src
unix:LIBS = -lxml2 -lpq
-windows:INCLUDEPATH += C:/mingw/include C:/PostgreSQL/9.2/include
-windows:LIBS = C:/mingw/bin/libxml2.dll C:/PostgreSQL/9.2/bin/libpq.dll
+windows:INCLUDEPATH += C:/mingw32-tdm/include C:/PostgreSQL/9.2/include
+windows:LIBS = C:/mingw32-tdm/bin/libxml2.dll C:/PostgreSQL/9.2/bin/libpq.dll
sources.files = samples schemas lang conf README.md COMPILING.md PLUGINS.md LICENSE libpgmodeler_ui/res/imagens/pgmodeler_logo.png
unix:sources.files += start-pgmodeler.sh
Please sign in to comment.
Something went wrong with that request. Please try again.