@@ -392,14 +392,15 @@ void TableViewLastColumnResizingFixer::connectViewHeadersSignals()
392392 connect (tableView->horizontalHeader (), SIGNAL (geometriesChanged ()), this , SLOT (on_geometriesChanged ()));
393393}
394394
395- // we need to disconnect these while handling the resize events, otherwise we can enter infinite loops
395+ // We need to disconnect these while handling the resize events, otherwise we can enter infinite loops.
396396void TableViewLastColumnResizingFixer::disconnectViewHeadersSignals ()
397397{
398398 disconnect (tableView->horizontalHeader (), SIGNAL (sectionResized (int ,int ,int )), this , SLOT (on_sectionResized (int ,int ,int )));
399399 disconnect (tableView->horizontalHeader (), SIGNAL (geometriesChanged ()), this , SLOT (on_geometriesChanged ()));
400400}
401401
402- // setup the resize mode, handles compatibility for QT5 and below as the method signatures changed. (refactored here for readability)
402+ // Setup the resize mode, handles compatibility for Qt5 and below as the method signatures changed.
403+ // Refactored here for readability.
403404void TableViewLastColumnResizingFixer::setViewHeaderResizeMode (int logicalIndex, QHeaderView::ResizeMode resizeMode)
404405{
405406#if QT_VERSION < 0x050000
@@ -409,7 +410,8 @@ void TableViewLastColumnResizingFixer::setViewHeaderResizeMode(int logicalIndex,
409410#endif
410411}
411412
412- void TableViewLastColumnResizingFixer::resizeColumn (int nColumnIndex, int width) {
413+ void TableViewLastColumnResizingFixer::resizeColumn (int nColumnIndex, int width)
414+ {
413415 tableView->setColumnWidth (nColumnIndex, width);
414416 tableView->horizontalHeader ()->resizeSection (nColumnIndex, width);
415417}
@@ -438,7 +440,7 @@ int TableViewLastColumnResizingFixer::getAvailableWidthForColumn(int column)
438440 return nResult;
439441}
440442
441- // make sure we don't make the columns wider than the table's viewport's width.
443+ // Make sure we don't make the columns wider than the tables viewport width.
442444void TableViewLastColumnResizingFixer::adjustTableColumnsWidth ()
443445{
444446 disconnectViewHeadersSignals ();
@@ -453,14 +455,15 @@ void TableViewLastColumnResizingFixer::adjustTableColumnsWidth()
453455 }
454456}
455457
456- // make column use all the space available, useful during window resizing.
457- void TableViewLastColumnResizingFixer::stretchColumnWidth (int column) {
458+ // Make column use all the space available, useful during window resizing.
459+ void TableViewLastColumnResizingFixer::stretchColumnWidth (int column)
460+ {
458461 disconnectViewHeadersSignals ();
459462 resizeColumn (column, getAvailableWidthForColumn (column));
460463 connectViewHeadersSignals ();
461464}
462465
463- // when a section is resized this is a slot-proxy for ajustAmountColumnWidth()
466+ // When a section is resized this is a slot-proxy for ajustAmountColumnWidth().
464467void TableViewLastColumnResizingFixer::on_sectionResized (int logicalIndex, int oldSize, int newSize)
465468{
466469 adjustTableColumnsWidth ();
@@ -471,8 +474,8 @@ void TableViewLastColumnResizingFixer::on_sectionResized(int logicalIndex, int o
471474 }
472475}
473476
474- // when the table's geometry is ready, we manually perform the Stretch of the "Message" column
475- // as the "Stretch" resize mode does not allow for interactive resizing.
477+ // When the tabless geometry is ready, we manually perform the stretch of the "Message" column,
478+ // as the "Stretch" resize mode does not allow for interactive resizing.
476479void TableViewLastColumnResizingFixer::on_geometriesChanged ()
477480{
478481 if ((getColumnsWidth () - this ->tableView ->horizontalHeader ()->width ()) != 0 )
@@ -488,9 +491,9 @@ void TableViewLastColumnResizingFixer::on_geometriesChanged()
488491 * the resize modes of the last 2 columns of the table and
489492 */
490493TableViewLastColumnResizingFixer::TableViewLastColumnResizingFixer (QTableView* table, int lastColMinimumWidth, int allColsMinimumWidth) :
491- tableView (table),
492- lastColumnMinimumWidth (lastColMinimumWidth),
493- allColumnsMinimumWidth (allColsMinimumWidth)
494+ tableView (table),
495+ lastColumnMinimumWidth (lastColMinimumWidth),
496+ allColumnsMinimumWidth (allColsMinimumWidth)
494497{
495498 columnCount = tableView->horizontalHeader ()->count ();
496499 lastColumnIndex = columnCount - 1 ;
@@ -500,7 +503,6 @@ TableViewLastColumnResizingFixer::TableViewLastColumnResizingFixer(QTableView* t
500503 setViewHeaderResizeMode (lastColumnIndex, QHeaderView::Interactive);
501504}
502505
503-
504506#ifdef WIN32
505507boost::filesystem::path static StartupShortcutPath ()
506508{
0 commit comments