don't shorten lines and add some ..., this will be done by Qt automatically

This commit is contained in:
Peinthor Rene
2012-02-21 14:47:41 +01:00
parent 4c856b3e31
commit e04b3891b3
3 changed files with 1 additions and 22 deletions

View File

@@ -43,11 +43,6 @@ void findForm::showResults(resultMap rmap)
findTableWidget->setRowCount(rmap.size());
for ( it = rmap.begin(); it != rmap.end(); ++it ) {
QString firstline = it.value().section( '\n', 0,0 );
if (firstline.length()>MAX_DISPLAY_LENGTH)
{
firstline.truncate(MAX_DISPLAY_LENGTH);
firstline.append("...");
}
findTableWidget->setItem( it.key(), 0, new QTableWidgetItem( QString::number(it.key() + 1) ) );
findTableWidget->setItem( it.key(), 1, new QTableWidgetItem( firstline) );
}

View File

@@ -1173,11 +1173,7 @@ void MainWindow::updateTableView(int lineToSelect)
// if (it!=(*rt).begin()){
QString& content = rt[e];
QString firstline = content.section( '\n', 0,0 );
if (content.length()>MAX_DISPLAY_LENGTH)
{
firstline.truncate(MAX_DISPLAY_LENGTH);
firstline.append("...");
}
QTableWidgetItem* item = new QTableWidgetItem(firstline);
item->setFlags(Qt::ItemIsSelectable | Qt::ItemIsEnabled);
dataTable->setItem( rowNum, colNum, item);
@@ -1594,11 +1590,6 @@ void MainWindow::updateRecordText(int row, int col, QString newtext)
QString content = cv ;
QString firstline = content.section( '\n', 0,0 );
if (content.length()>14)
{
firstline.truncate(14);
firstline.append("...");
}
dataTable->setItem( row - recAtTop, col, new QTableWidgetItem(firstline));
}
@@ -1689,11 +1680,6 @@ void MainWindow::executeQuery()
//show it here
QString decoded = db.GetDecodedQString(rv);
QString firstline = decoded.section( '\n', 0,0 );
if (firstline.length()>MAX_DISPLAY_LENGTH)
{
firstline.truncate(MAX_DISPLAY_LENGTH);
firstline.append("...");
}
queryResultListModel->setItem(rownum, e, new QStandardItem(QString(firstline)));
}
queryResultListModel->setVerticalHeaderItem(rownum, new QStandardItem(QString::number(rownum + 1)));

View File

@@ -8,8 +8,6 @@
#include "sqlite3.h"
#include "sqlitebrowsertypes.h"
#define MAX_DISPLAY_LENGTH 255
class SQLLogDock;
enum