By default, Bugzilla does not search the list of RESOLVED bugs.
You can force it to do so by putting the upper-case word ALL in front of your search query, e.g.: ALL tdelibs
We recommend searching for bugs this way, as you may discover that your bug has already been resolved and fixed in a later release. View | Details | Raw Unified | Return to bug 2541
Collapse All | Expand All

(-)ark.orig/filelistview.cpp (+55 lines)
Lines 500-505 Link Here
500
	return size;
500
	return size;
501
}
501
}
502
502
503
void FileListView::updateItem(  const QStringList & entries )
504
{
505
	QStringList ancestorList = QStringList::split( '/', entries[0] );
506
507
	// Checks if the listview contains the first item in the list of ancestors
508
	QListViewItem *item = firstChild();
509
	while ( item )
510
	{
511
		if ( item->text( 0 ) == ancestorList[0] )
512
			break;
513
		item = item->nextSibling();
514
	}
515
516
	// If the list view does not contain the item ...
517
	if ( !item )
518
	{
519
    	kdError( 1601 ) << ancestorList[0] << " not found" << endl;
520
		return;
521
	}
522
523
	// We've already dealt with the first item, remove it
524
	ancestorList.pop_front();
525
526
	while ( ancestorList.count() > 0 )
527
	{
528
		QString name = ancestorList[0];
529
530
		FileLVI *parent = static_cast< FileLVI*>( item );
531
		item = parent->firstChild();
532
		while ( item )
533
		{
534
			if ( item->text(0) == name )
535
				break;
536
			item = item->nextSibling();
537
		}
538
539
		if ( !item )
540
		{
541
    		kdError( 1601 ) << name << " not found" << endl;
542
			return;
543
		}
544
545
		ancestorList.pop_front();
546
	}
547
548
	int i = 0;
549
	for (QStringList::ConstIterator it = entries.begin(); it != entries.end(); ++it)
550
	{
551
		item->setText(i, *it);
552
		++i;
553
	}
554
555
	item->setOpen( true );
556
}
557
503
FileLVI* FileListView::findParent( const TQString& fullname )
558
FileLVI* FileListView::findParent( const TQString& fullname )
504
{
559
{
505
	TQString name = fullname;
560
	TQString name = fullname;
(-)ark.orig/filelistview.h (+6 lines)
Lines 112-117 Link Here
112
		void addItem( const QStringList & entries );
112
		void addItem( const QStringList & entries );
113
113
114
		/**
114
		/**
115
		 * Update a file or folder already included in the listview 
116
		 * @param entries A stringlist of the entries for each column of the list.
117
		 */
118
		void updateItem( const QStringList & entries );
119
120
		/**
115
		 * Returns the number of files in the archive.
121
		 * Returns the number of files in the archive.
116
		 */
122
		 */
117
		int totalFiles();
123
		int totalFiles();
(-)ark.orig/rar.cpp (-32 / +23 lines)
Lines 84-92 Link Here
84
84
85
85
86
86
87
  m_headerString = "-------------------------------------------------------------------------------";
87
  m_headerString = "----------- ---------  -------- ----- -------- -----  --------  ----";
88
89
  m_isFirstLine = true;
90
}
88
}
91
89
92
bool RarArch::processLine( const TQCString &line )
90
bool RarArch::processLine( const TQCString &line )
Lines 96-134 Link Here
96
  TQTextCodec *codec = TQTextCodec::codecForLocale();
94
  TQTextCodec *codec = TQTextCodec::codecForLocale();
97
  unicode_line = codec->toUnicode( line );
95
  unicode_line = codec->toUnicode( line );
98
96
99
  if ( m_isFirstLine )
100
  {
101
    m_entryFilename = TQString::fromLocal8Bit( line );
102
    m_entryFilename.remove( 0, 1 );
103
    m_isFirstLine = false;
104
    return true;
105
  }
106
107
  TQStringList list;
97
  TQStringList list;
108
98
109
  TQStringList l2 = TQStringList::split( ' ', line );
99
  TQStringList l2 = TQStringList::split( ' ', line );
110
100
111
  if( l2[5].startsWith("d") )
101
  // filename is after CRC column
112
  {
102
  int idx = line.find(l2[6]) + l2[6].length() + 2; // beginning of file name
113
    m_isFirstLine = true;
103
  m_entryFilename = line.mid(idx);
114
    return true;
115
  }
116
117
  list << m_entryFilename; // filename
104
  list << m_entryFilename; // filename
118
  list << l2[ 0 ]; // size
105
119
  list << l2[ 1 ]; // packed
106
  list << l2[ 1 ]; // size
120
  list << l2[ 2 ]; // ratio
107
  list << l2[ 2 ]; // packed
121
108
  list << l2[ 3 ]; // ratio
122
  TQStringList date =  TQStringList::split( '-', l2[ 3 ] );
109
123
  list << ArkUtils::fixYear( date[ 2 ].latin1() ) + '-' + date[ 1 ] + '-' + date [ 0 ] + ' ' + l2[4]; // date
110
  TQStringList date =  TQStringList::split( '-', l2[ 4 ] );
124
  list << l2[ 5 ]; // attributes
111
  list << ArkUtils::fixYear( date[ 2 ].latin1() ) + '-' + date[ 1 ] + '-' + date [ 0 ] + ' ' + l2[5]; // date
112
125
  list << l2[ 6 ]; // crc
113
  list << l2[ 6 ]; // crc
126
  list << l2[ 7 ]; // method
127
  list << l2[ 8 ]; // Version
128
114
129
  m_gui->fileList()->addItem( list ); // send to GUI
115
  // send to GUI
116
  if ( l2[0] == "...D..." )  /* (un)rar v5 only */
117
  {
118
    // RAR utilities show the folders at the end of the listing so the folders
119
    // have been already added to the listview at this point without specifying
120
    // all the columns but name: let's fill the missing infos
121
    m_gui->fileList()->updateItem( list );
122
  }
123
  else
124
    m_gui->fileList()->addItem( list );
130
125
131
  m_isFirstLine = true;
132
  return true;
126
  return true;
133
}
127
}
134
128
Lines 138-147 Link Here
138
  list.append( PACKED_COLUMN );
138
  list.append( PACKED_COLUMN );
139
  list.append( RATIO_COLUMN );
139
  list.append( RATIO_COLUMN );
140
  list.append( TIMESTAMP_COLUMN );
140
  list.append( TIMESTAMP_COLUMN );
141
  list.append( PERMISSION_COLUMN );
142
  list.append( CRC_COLUMN );
141
  list.append( CRC_COLUMN );
143
  list.append( METHOD_COLUMN );
144
  list.append( VERSION_COLUMN );
145
142
146
  emit headers( list );
143
  emit headers( list );
147
}
144
}
Lines 270-276 Link Here
270
270
271
bool RarArch::passwordRequired()
271
bool RarArch::passwordRequired()
272
{
272
{
273
    return m_lastShellOutput.find("Enter password") >= 0;
273
    return m_lastShellOutput.find("Enter password") >= 0 || m_lastShellOutput.find("encrypted") >= 0;
274
}
274
}
275
275
276
void RarArch::remove( QStringList *list )
276
void RarArch::remove( QStringList *list )

Return to bug 2541