summaryrefslogtreecommitdiff
Unidiff
Diffstat (more/less context) (ignore whitespace changes)
-rw-r--r--noncore/settings/aqpkg/mainwin.cpp4
-rw-r--r--noncore/settings/aqpkg/mem.cpp1
2 files changed, 4 insertions, 1 deletions
diff --git a/noncore/settings/aqpkg/mainwin.cpp b/noncore/settings/aqpkg/mainwin.cpp
index 4e9cc12..5ccd3c3 100644
--- a/noncore/settings/aqpkg/mainwin.cpp
+++ b/noncore/settings/aqpkg/mainwin.cpp
@@ -1,41 +1,43 @@
1/*************************************************************************** 1/***************************************************************************
2 mainwin.cpp - description 2 mainwin.cpp - description
3 ------------------- 3 -------------------
4 begin : Mon Aug 26 13:32:30 BST 2002 4 begin : Mon Aug 26 13:32:30 BST 2002
5 copyright : (C) 2002 by Andy Qua 5 copyright : (C) 2002 by Andy Qua
6 email : andy.qua@blueyonder.co.uk 6 email : andy.qua@blueyonder.co.uk
7 ***************************************************************************/ 7 ***************************************************************************/
8 8
9/*************************************************************************** 9/***************************************************************************
10 * * 10 * *
11 * This program is free software; you can redistribute it and/or modify * 11 * This program is free software; you can redistribute it and/or modify *
12 * it under the terms of the GNU General Public License as published by * 12 * it under the terms of the GNU General Public License as published by *
13 * the Free Software Foundation; either version 2 of the License, or * 13 * the Free Software Foundation; either version 2 of the License, or *
14 * (at your option) any later version. * 14 * (at your option) any later version. *
15 * * 15 * *
16 ***************************************************************************/ 16 ***************************************************************************/
17 17
18#include <iostream>
19
18#include <qmenubar.h> 20#include <qmenubar.h>
19#include <qpopupmenu.h> 21#include <qpopupmenu.h>
20#include <qmessagebox.h> 22#include <qmessagebox.h>
21 23
22#include "mainwin.h" 24#include "mainwin.h"
23#include "datamgr.h" 25#include "datamgr.h"
24#include "networkpkgmgr.h" 26#include "networkpkgmgr.h"
25#include "settingsimpl.h" 27#include "settingsimpl.h"
26#include "helpwindow.h" 28#include "helpwindow.h"
27#include "utils.h" 29#include "utils.h"
28#include "global.h" 30#include "global.h"
29 31
30MainWindow :: MainWindow( QWidget *p, char *name ) 32MainWindow :: MainWindow( QWidget *p, char *name )
31 :QMainWindow( p, name ) 33 :QMainWindow( p, name )
32{ 34{
33#ifdef QWS 35#ifdef QWS
34 showMaximized(); 36 showMaximized();
35#endif 37#endif
36 38
37 setCaption( "AQPkg - Package Manager" ); 39 setCaption( "AQPkg - Package Manager" );
38 40
39 // Create our menu 41 // Create our menu
40 help = new QPopupMenu( this ); 42 help = new QPopupMenu( this );
41 help->insertItem( "&General", this, SLOT(displayHelp()), Qt::CTRL+Qt::Key_G ); 43 help->insertItem( "&General", this, SLOT(displayHelp()), Qt::CTRL+Qt::Key_G );
@@ -60,49 +62,49 @@ MainWindow :: MainWindow( QWidget *p, char *name )
60 menu->insertItem( "&Filter", filter ); 62 menu->insertItem( "&Filter", filter );
61 menu->insertItem( "&Help", help ); 63 menu->insertItem( "&Help", help );
62 64
63 mgr = new DataManager(); 65 mgr = new DataManager();
64 mgr->loadServers(); 66 mgr->loadServers();
65 67
66 stack = new QWidgetStack( this ); 68 stack = new QWidgetStack( this );
67 69
68 networkPkgWindow = new NetworkPackageManager( mgr, stack ); 70 networkPkgWindow = new NetworkPackageManager( mgr, stack );
69 stack->addWidget( networkPkgWindow, 1 ); 71 stack->addWidget( networkPkgWindow, 1 );
70 72
71 setCentralWidget( stack ); 73 setCentralWidget( stack );
72 stack->raiseWidget( networkPkgWindow ); 74 stack->raiseWidget( networkPkgWindow );
73} 75}
74 76
75MainWindow :: ~MainWindow() 77MainWindow :: ~MainWindow()
76{ 78{
77 delete networkPkgWindow; 79 delete networkPkgWindow;
78} 80}
79 81
80void MainWindow :: setDocument( const QString &doc ) 82void MainWindow :: setDocument( const QString &doc )
81{ 83{
82 // Remove path from package 84 // Remove path from package
83 QString package = Utils::getPackageNameFromIpkFilename( doc ); 85 QString package = Utils::getPackageNameFromIpkFilename( doc );
84 cout << "Selecting package " << package << endl; 86 std::cout << "Selecting package " << package << std::endl;
85 networkPkgWindow->selectLocalPackage( package ); 87 networkPkgWindow->selectLocalPackage( package );
86} 88}
87 89
88void MainWindow :: displaySettings() 90void MainWindow :: displaySettings()
89{ 91{
90 SettingsImpl *dlg = new SettingsImpl( mgr, this, "Settings", true ); 92 SettingsImpl *dlg = new SettingsImpl( mgr, this, "Settings", true );
91 if ( dlg->showDlg( 0 ) ) 93 if ( dlg->showDlg( 0 ) )
92 networkPkgWindow->updateData(); 94 networkPkgWindow->updateData();
93 delete dlg; 95 delete dlg;
94} 96}
95 97
96void MainWindow :: displayHelp() 98void MainWindow :: displayHelp()
97{ 99{
98 HelpWindow *dlg = new HelpWindow( this ); 100 HelpWindow *dlg = new HelpWindow( this );
99 dlg->exec(); 101 dlg->exec();
100 delete dlg; 102 delete dlg;
101} 103}
102 104
103void MainWindow :: searchForPackage() 105void MainWindow :: searchForPackage()
104{ 106{
105 networkPkgWindow->searchForPackage( false ); 107 networkPkgWindow->searchForPackage( false );
106} 108}
107 109
108void MainWindow :: repeatSearchForPackage() 110void MainWindow :: repeatSearchForPackage()
diff --git a/noncore/settings/aqpkg/mem.cpp b/noncore/settings/aqpkg/mem.cpp
index 76ce35c..405aada 100644
--- a/noncore/settings/aqpkg/mem.cpp
+++ b/noncore/settings/aqpkg/mem.cpp
@@ -1,42 +1,43 @@
1/*************************************************************************** 1/***************************************************************************
2 mem.h - description 2 mem.h - description
3 ------------------- 3 -------------------
4 begin : Mon Aug 26 2002 4 begin : Mon Aug 26 2002
5 copyright : (C) 2002 by Andy Qua 5 copyright : (C) 2002 by Andy Qua
6 email : andy.qua@blueyonder.co.uk 6 email : andy.qua@blueyonder.co.uk
7 ***************************************************************************/ 7 ***************************************************************************/
8 8
9/*************************************************************************** 9/***************************************************************************
10 * * 10 * *
11 * This program is free software; you can redistribute it and/or modify * 11 * This program is free software; you can redistribute it and/or modify *
12 * it under the terms of the GNU General Public License as published by * 12 * it under the terms of the GNU General Public License as published by *
13 * the Free Software Foundation; either version 2 of the License, or * 13 * the Free Software Foundation; either version 2 of the License, or *
14 * (at your option) any later version. * 14 * (at your option) any later version. *
15 * * 15 * *
16 ***************************************************************************/ 16 ***************************************************************************/
17#include <stdio.h> 17#include <stdio.h>
18#include <fstream> 18#include <fstream>
19#include <iostream>
19#include <list> 20#include <list>
20using namespace std; 21using namespace std;
21 22
22#define __MEMFILE_C 23#define __MEMFILE_C
23#include "global.h" 24#include "global.h"
24 25
25#ifdef _DEBUG 26#ifdef _DEBUG
26 27
27void __cdecl *operator new( unsigned int size, const char *file, int line ) 28void __cdecl *operator new( unsigned int size, const char *file, int line )
28{ 29{
29 void *ptr = (void *)malloc(size); 30 void *ptr = (void *)malloc(size);
30 AddTrack((long)ptr, size, file, line); 31 AddTrack((long)ptr, size, file, line);
31 return(ptr); 32 return(ptr);
32} 33}
33 34
34void operator delete(void *p) 35void operator delete(void *p)
35{ 36{
36 RemoveTrack((long)p); 37 RemoveTrack((long)p);
37 free(p); 38 free(p);
38} 39}
39 40
40#endif 41#endif
41 42
42 43