<commit_before>//
// Copyright (C) 2003	 <NAME> <gj at pointblue.com.pl>
//
// gadupubdir.cpp
//  Gadu-Gadu Public directory contains people data, using it you can search friends
// different criteria
//
// This program is free software; you can redistribute it and/or
// modify it under the terms of the GNU General Public License
// as published by the Free Software Foundation; either version 2
// of the License, or (at your option) any later version.
//
// This program is distributed in the hope that it will be useful,
// but WITHOUT ANY WARRANTY; without even the implied warranty of
// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.	 See the
// GNU General Public License for more details.
//
// You should have received a copy of the GNU General Public License
// along with this program; if not, write to the Free Software
// Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA
// 02111-1307, USA.
//

#include "gadupubdir.h"

#include <qpushbutton.h>
#include <qtextedit.h>
#include <qwidgetstack.h>
#include <qlistview.h>
#include <qptrlist.h>
#include <qradiobutton.h>

#include <kapplication.h>
#include <kdatewidget.h>
#include <klineedit.h>
#include <klocale.h>
#include <kurllabel.h>
#include <klistview.h>


GaduPublicDir::GaduPublicDir( GaduAccount* account, QWidget* parent, const char* name )
: KDialogBase( parent, name, false, QString::null, User1|User2|User3|Cancel, User2 )
{
	mAccount = account;
	createWidget();
	initConnections();

	show();
}

GaduPublicDir::GaduPublicDir( GaduAccount* account, int searchFor, QWidget* parent, const char* name )
: KDialogBase( parent, name, false, QString::null, User1|User2|User3|Cancel, User2 )
{
	mAccount = account;
	createWidget();
	initConnections();

	kdDebug( 14100 ) << "search for Uin: " << fUin << endl;
	
	mMainWidget->listFound->clear();
	show();

	mMainWidget->pubsearch->raiseWidget( 1 );
	mMainWidget->radioByUin->setChecked( true );

	setButtonText( User2, i18n( "Search &More..." ) );
	showButton( User3, true );
	showButton( User1, true );
	enableButton( User3, false );
	enableButton( User2, false );

	// now it is time to switch to Right Page(tm)
	fName	=  fSurname =  fNick = fCity = QString::null;
	fUin		= searchFor;
	fOnlyOnline= false;
	fGender	= fAgeFrom = fAgeTo = 0;

	mAccount->pubDirSearch( fName, fSurname, fNick,<commit_msg>don't use uninitialized variable here<commit_after>//
// Copyright (C) 2003	 <NAME> <gj at pointblue.com.pl>
//
// gadupubdir.cpp
//  Gadu-Gadu Public directory contains people data, using it you can search friends
// different criteria
//
// This program is free software; you can redistribute it and/or
// modify it under the terms of the GNU General Public License
// as published by the Free Software Foundation; either version 2
// of the License, or (at your option) any later version.
//
// This program is distributed in the hope that it will be useful,
// but WITHOUT ANY WARRANTY; without even the implied warranty of
// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.	 See the
// GNU General Public License for more details.
//
// You should have received a copy of the GNU General Public License
// along with this program; if not, write to the Free Software
// Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA
// 02111-1307, USA.
//

#include "gadupubdir.h"

#include <qpushbutton.h>
#include <qtextedit.h>
#include <qwidgetstack.h>
#include <qlistview.h>
#include <qptrlist.h>
#include <qradiobutton.h>

#include <kapplication.h>
#include <kdatewidget.h>
#include <klineedit.h>
#include <klocale.h>
#include <kurllabel.h>
#include <klistview.h>


GaduPublicDir::GaduPublicDir( GaduAccount* account, QWidget* parent, const char* name )
: KDialogBase( parent, name, false, QString::null, User1|User2|User3|Cancel, User2 )
{
	mAccount = account;
	createWidget();
	initConnections();

	show();
}

GaduPublicDir::GaduPublicDir( GaduAccount* account, int searchFor, QWidget* parent, const char* name )
: KDialogBase( parent, name, false, QString::null, User1|User2|User3|Cancel, User2 )
{
	mAccount = account;
	createWidget();
	initConnections();

	kdDebug( 14100 ) << "search for Uin: " << searchFor << endl;
	
	mMainWidget->listFound->clear();
	show();

	mMainWidget->pubsearch->raiseWidget( 1 );
	mMainWidget->radioByUin->setChecked( true );

	setButtonText( User2, i18n( "Search &More..." ) );
	showButton( User3, true );
	showButton( User1, true );
	enableButton( User3, false );
	enableButton( User2, false );

	// now it is time to switch to Right Page(tm)
	fName	=  fSurname =  fNick = fCity = QString::null;
	fUin		= searchFor;
	fOnlyOnline= false;
	fGender	= fAgeFrom = fAgeTo = 0;

	mAccount->pubDirSearch( fName, fSurname, fNick,
{'fraction_non_alphanumeric': 0.12284436874600808, 'fraction_numerical': 0.017457951884181394, 'mean_word_length': 4.3447098976109215, 'pattern_counts': {'":': 0, '<': 43, '<?xml version=': 0, '>': 45, 'https://': 0, 'lorem ipsum': 0, 'www.': 0, 'xml': 0}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 0, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'dir': 'git-commits-cleaned', 'id': '3491064', 'n_tokens_mistral': 1605, 'n_tokens_neox': 1534, 'n_words': 521}