Skip to content

Commit

Permalink
fix: add missing Q_OBJECT to QT related files.
Browse files Browse the repository at this point in the history
  • Loading branch information
Trico-Everfire committed May 19, 2024
1 parent d3504a9 commit 3fa5da0
Show file tree
Hide file tree
Showing 3 changed files with 24 additions and 2 deletions.
1 change: 1 addition & 0 deletions src/EntryTree.h
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,7 @@
#include <QTreeWidget>
class EntryTree : public QTreeView
{
Q_OBJECT
public:
EntryTree( QWidget *pParent );
};
Expand Down
23 changes: 21 additions & 2 deletions src/MainWindow.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -436,6 +436,10 @@ void CMainWindow::compressVTFFile()

vBLayout->addWidget( pSelectDestinationLocation, 4, 1 );

auto pRecomputeReflectivity = new QCheckBox( "Recompute Reflectivity", pCompressionDialog );

vBLayout->addWidget( pRecomputeReflectivity, 5, 0, 1, 2 );

auto pButtonLayout = new QHBoxLayout();

auto pOkButton = new QPushButton( "Update Version", pCompressionDialog );
Expand All @@ -444,7 +448,7 @@ void CMainWindow::compressVTFFile()
auto pCancelButton = new QPushButton( "Cancel", pCompressionDialog );
pButtonLayout->addWidget( pCancelButton, Qt::AlignCenter );

vBLayout->addLayout( pButtonLayout, 5, 0, 1, 2 );
vBLayout->addLayout( pButtonLayout, 6, 0, 1, 2 );

bool compress = false;

Expand Down Expand Up @@ -533,6 +537,11 @@ void CMainWindow::compressVTFFile()
}
#endif

if ( pRecomputeReflectivity->isChecked() )
{
pVTF->ComputeReflectivity();
}

if ( pathDirectory.isEmpty() )
pVTF->Save( filePath.toUtf8().constData() );
else
Expand Down Expand Up @@ -616,6 +625,10 @@ void CMainWindow::compressVTFFolder()

vBLayout->addWidget( pSelectDestinationLocation, 4, 1 );

auto pRecomputeReflectivity = new QCheckBox( "Recompute Reflectivity", pCompressionDialog );

vBLayout->addWidget( pRecomputeReflectivity, 5, 0, 1, 2 );

auto pButtonLayout = new QHBoxLayout();

auto pOkButton = new QPushButton( "Update Version", pCompressionDialog );
Expand All @@ -624,7 +637,7 @@ void CMainWindow::compressVTFFolder()
auto pCancelButton = new QPushButton( "Cancel", pCompressionDialog );
pButtonLayout->addWidget( pCancelButton, Qt::AlignCenter );

vBLayout->addLayout( pButtonLayout, 5, 0, 1, 2 );
vBLayout->addLayout( pButtonLayout, 6, 0, 1, 2 );

bool compress = false;

Expand Down Expand Up @@ -736,6 +749,12 @@ void CMainWindow::compressVTFFolder()
pVTF->SetAuxCompressionLevel( pAuxCompressionLevelBox->currentData().toInt() );
}
#endif

if ( pRecomputeReflectivity->isChecked() )
{
pVTF->ComputeReflectivity();
}

if ( pathDirectory.isEmpty() )
{
if ( !pVTF->Save( path.toUtf8().constData() ) )
Expand Down
2 changes: 2 additions & 0 deletions src/VTFEImport.h
Original file line number Diff line number Diff line change
Expand Up @@ -22,6 +22,8 @@ class VTFEImport;

class GeneralTab : public QDialog
{
Q_OBJECT

friend class VTFEImport;
QGridLayout *pMainLayout;
void GeneralOptions();
Expand Down

0 comments on commit 3fa5da0

Please sign in to comment.