[PC-BSD Dev] Splitted libpcbsd and bug report tool

Yuri Momotiuk yurkis at gmail.com
Tue Feb 12 06:36:09 PST 2013


Hello

I have some progress with simple pc-bugreport tool and libpcbsd split.

You can check sources from my assembla repo:

*svn co
https://subversion.assembla.com/svn/pcbsd-extras/trunk/experimental/src-qt4*

libpcbsd is splitted for (please read changes below):
** libpcbsd-utils - utils without Qt ui dependancies*
To  avoid trivial names collisions namespace *pcbsd* was added.
For switching to those library you should:
1. Change library name and includepath in your .pro file:
*
*
*LIBS+= -lpcbsd-utils*
*
*
*INCLUDEPATH+= ../libpcbsd/utils*

2. Use pcbsd namespace

*#include "pcbsd-utils"*
*using namespace pcbsd;*

*BE AWARE! Function quickUserInputBox is absent in libpcbsd-utils and Utils
class. *Now it is in libpcbsd-ui in UI class, so you should call it like
this:

*pcbsd::UI::quickUserInputBox(...);
*

Also I have added two function into Utils:
installedDesktops() and currentDesktop() to get list of installed desktop
environments or just current desktop environment info (using de-info script)

**libpcbsd-ui - UI related staff (like widgets and so on)*
For switching to those library you should:
1. Change library name and includepath in your .pro file:
*
*
*LIBS+= -lpcbsd-ui*
*
*
*INCLUDEPATH+= ../libpcbsd/ui*

I'm not using pcbsd namespace for widgets.

Also I have add two classes to libpcbsd-utils:

class PCApplication - base class for pcbsd util application. This is a
child of QApplication with translations loading.

In common case you may write your main function like:

*#include "pcbsd-ui.h"*
*...*
*int main(argc, argv)*
*{*
*    PCApplication(argc, argv,"pc-application"); // last param is a name of
file with translations*
*...*
*}*

class PCSingleApplication - same for single instance application
(unfinished yet)


If you like this changes (including pc-bugreport) I can commit it into
pcbsd repo and finish work there. After commit current libpcbsd still will
be present.


-- 
Best regards, Yuri Momotyuk
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.pcbsd.org/pipermail/dev/attachments/20130212/e2dd6d23/attachment.html>


More information about the Dev mailing list