[PC-BSD Commits] r19757 - users/ken/EasyPBI2

svn at pcbsd.org svn at pcbsd.org
Wed Oct 17 16:42:02 PDT 2012


Author: kenmoore
Date: 2012-10-17 23:42:01 +0000 (Wed, 17 Oct 2012)
New Revision: 19757

Modified:
   users/ken/EasyPBI2/Makefile
   users/ken/EasyPBI2/main.cpp
   users/ken/EasyPBI2/mainGUI.cpp
   users/ken/EasyPBI2/mainGUI.h
   users/ken/EasyPBI2/mainGUI.ui
Log:
Fix the random bus error in EasyPBI2 when shutting down the program. It was caused by the QMenu's that I am adding to a number of the pushbuttons.



Modified: users/ken/EasyPBI2/Makefile
===================================================================
--- users/ken/EasyPBI2/Makefile	2012-10-17 22:40:19 UTC (rev 19756)
+++ users/ken/EasyPBI2/Makefile	2012-10-17 23:42:01 UTC (rev 19757)
@@ -1,6 +1,6 @@
 #############################################################################
 # Makefile for building: EasyPBI
-# Generated by qmake (2.01a) (Qt 4.8.2) on: Thu Oct 4 17:40:25 2012
+# Generated by qmake (2.01a) (Qt 4.8.2) on: Wed Oct 17 18:55:50 2012
 # Project:  EasyPBI.pro
 # Template: app
 # Command: /usr/local/bin/qmake-qt4 -o Makefile EasyPBI.pro

Modified: users/ken/EasyPBI2/main.cpp
===================================================================
--- users/ken/EasyPBI2/main.cpp	2012-10-17 22:40:19 UTC (rev 19756)
+++ users/ken/EasyPBI2/main.cpp	2012-10-17 23:42:01 UTC (rev 19757)
@@ -11,6 +11,7 @@
     if( a.isRunning() )
       return !(a.sendMessage("show"));
 
+    /*
     QTranslator translator;
     QLocale mylocale;
     QString langCode = mylocale.name();
@@ -19,7 +20,7 @@
     translator.load( QString("EasyPBI_") + langCode, PREFIX + "/share/pcbsd/i18n/" );
     a.installTranslator( &translator );
     qDebug() << "Locale:" << langCode;
-    
+    */
 
     MainGUI w;
     QObject::connect(&a, SIGNAL(messageReceived(const QString&)), &w, SLOT(slotSingleInstance()) );

Modified: users/ken/EasyPBI2/mainGUI.cpp
===================================================================
--- users/ken/EasyPBI2/mainGUI.cpp	2012-10-17 22:40:19 UTC (rev 19756)
+++ users/ken/EasyPBI2/mainGUI.cpp	2012-10-17 23:42:01 UTC (rev 19757)
@@ -17,7 +17,7 @@
 	currentModule = new ModBuild();
 	//Setup the Menu items
 	ui->actionExit->setIcon(Backend::icon(""));
-	menuList.clear();
+	//menuList = new QList<QMenu*>;
 	//Setup Toolbar
 	ui->actionNew_Module->setIcon(Backend::icon("new"));
 	ui->actionLoad_Module->setIcon(Backend::icon("load"));
@@ -37,8 +37,8 @@
 	ui->push_change_progdir->setIcon(Backend::icon("load"));
 	ui->push_change_makeport->setIcon(Backend::icon("file"));
 	ui->push_addmakeopt->setIcon(Backend::icon("left"));
-	menuList[0] = new QMenu();
-	ui->push_addmakeopt->setMenu(menuList[0]);
+	//menuList[0] = new QMenu();
+	//ui->push_addmakeopt->setMenu(menuList[0]);
 	ui->push_config_save->setIcon(Backend::icon("save"));
 	// -- resources tab --
 	ui->push_resources_savewrapper->setIcon(Backend::icon("save"));
@@ -54,18 +54,18 @@
 	ui->list_scripts_file->addItems(QStringList() << "Installation Scripts" << "pre-portmake.sh" << "post-portmake.sh" << "pre-install.sh" << "post-install.sh" << "pre-remove.sh" );
 	// -- External links tab --
 	ui->push_el_files->setIcon(Backend::icon("left"));
-	menuList[1] = new QMenu();
-	menuList[1]->addAction("No Binaries Detected");
-	ui->push_el_files->setMenu(menuList[1]);
+	//menuList[1] = new QMenu();
+	//menuList[1]->addAction("No Binaries Detected");
+	//ui->push_el_files->setMenu(menuList[1]);
 	
 	ui->push_el_filetype->setIcon(Backend::icon("left"));
-	menuList[2] = new QMenu();
-	menuList[2]->addAction("binary");
-	menuList[2]->addAction("linux");
-	menuList[2]->addAction("keep");
-	menuList[2]->addAction("replace");
-	menuList[2]->addAction("nocrash");
-	ui->push_el_filetype->setMenu(menuList[2]);
+	//menuList[2] = new QMenu();
+	//menuList[2]->addAction("binary");
+	//menuList[2]->addAction("linux");
+	//menuList[2]->addAction("keep");
+	//menuList[2]->addAction("replace");
+	//menuList[2]->addAction("nocrash");
+	//ui->push_el_filetype->setMenu(menuList[2]);
 	//Setup PBI Builder
 	ui->push_build_stop->setIcon(Backend::icon("close"));
 	ui->push_build_save->setIcon(Backend::icon("save"));
@@ -77,7 +77,7 @@
 
 MainGUI::~MainGUI()
 {
-  qDebug() << "Closing EasyPBI";
+  qDebug() << "Shutting down EasyPBI";
 }
 
 void MainGUI::slotSingleInstance(){
@@ -328,7 +328,7 @@
 
 void MainGUI::on_actionExit_triggered(){
   qDebug() << "Close EasyPBI requested";
-  close();
+  this->close();
 }
 
 void MainGUI::on_actionNew_Module_triggered(){

Modified: users/ken/EasyPBI2/mainGUI.h
===================================================================
--- users/ken/EasyPBI2/mainGUI.h	2012-10-17 22:40:19 UTC (rev 19756)
+++ users/ken/EasyPBI2/mainGUI.h	2012-10-17 23:42:01 UTC (rev 19757)
@@ -44,7 +44,7 @@
     ModBuild *currentModule;
     QLineEdit *line_module;
     QRadioButton *radio_module_port, *radio_module_local;
-    QList<QMenu*> menuList;
+    //QList<QMenu*> menuList;
 
     QString PROG_DIR, PORTS_DIR, PBIOUT_DIR, MODOUT_DIR, CACHE_DIR, PROGVERSION, PBISETTINGS_FILE, DEFAULTICON_FILE;
     QString SU_CMD, PBIBUILD_CMD, PBICREATE_CMD, PBI_BUILDING_NOW;
@@ -56,4 +56,4 @@
 
 };
 
-#endif // MAINWINDOW_H
+#endif // MAINGUI_H

Modified: users/ken/EasyPBI2/mainGUI.ui
===================================================================
(Binary files differ)



More information about the Commits mailing list