summaryrefslogtreecommitdiff
path: root/core/pim/addressbook/abview.cpp
Side-by-side diff
Diffstat (limited to 'core/pim/addressbook/abview.cpp') (more/less context) (ignore whitespace changes)
-rw-r--r--core/pim/addressbook/abview.cpp3
1 files changed, 2 insertions, 1 deletions
diff --git a/core/pim/addressbook/abview.cpp b/core/pim/addressbook/abview.cpp
index 6cbd556..670cdb0 100644
--- a/core/pim/addressbook/abview.cpp
+++ b/core/pim/addressbook/abview.cpp
@@ -32,49 +32,50 @@ QString addressbookPersonalVCardName()
{
QString filename = Global::applicationFileName("addressbook",
"businesscard.vcf");
return filename;
}
AbView::AbView ( QWidget* parent, const QValueList<int>& ordered ):
QWidget(parent),
mCat(0),
m_inSearch( false ),
m_inPersonal( false ),
m_curr_category( -1 ),
m_curr_View( TableView ),
m_prev_View( TableView ),
m_curr_Contact ( 0 ),
m_contactdb ( 0l ),
m_storedDB ( 0l ),
m_viewStack( 0l ),
m_abTable( 0l ),
m_orderedFields( ordered )
{
qWarning("AbView::c'tor");
// Load default database and handle syncing myself.. !
- m_contactdb = new OContactAccess ( "addressbook", 0l, 0l, false ),
+ m_contactdb = new OContactAccess ( "addressbook", 0l, 0l, false );
+ m_contactdb -> setReadAhead( 16 ); // Use ReadAhead-Cache if available
mCat.load( categoryFileName() );
// Create Layout and put WidgetStack into it.
QVBoxLayout *vb = new QVBoxLayout( this );
m_viewStack = new QWidgetStack( this );
vb->addWidget( m_viewStack );
// Creat TableView
QVBox* tableBox = new QVBox( m_viewStack );
m_abTable = new AbTable( m_orderedFields, tableBox, "table" );
m_abTable->setCurrentCell( 0, 0 );
m_abTable->setFocus();
// Add TableView to WidgetStack and raise it
m_viewStack -> addWidget( tableBox , TableView );
// Create CardView and add it to WidgetStack
QVBox* cardBox = new QVBox( m_viewStack );
m_ablabel = new AbLabel( cardBox, "CardView");
m_viewStack -> addWidget( cardBox , CardView );
// Connect views to me
connect ( m_abTable, SIGNAL( signalSwitch( void ) ),
this, SLOT( slotSwitch( void ) ) );