Skip to content

Commit

Permalink
Fix Crash when open a xz file.
Browse files Browse the repository at this point in the history
  • Loading branch information
dridk committed Mar 2, 2017
1 parent 9926213 commit 3d0cf56
Show file tree
Hide file tree
Showing 3 changed files with 4 additions and 4 deletions.
2 changes: 1 addition & 1 deletion FastQt.pro
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@
QT += core gui concurrent charts svg
#QMAKE_CXXFLAGS += -Ofast
QMAKE_CXXFLAGS += -std=c++11
CONFIG(release, debug|release):DEFINES += QT_NO_DEBUG_OUTPUT
#CONFIG(release, debug|release):DEFINES += QT_NO_DEBUG_OUTPUT


# METHOD 1 : If KArchive is not installed as a Qt Module then copy to your Qt installation :
Expand Down
4 changes: 2 additions & 2 deletions ui/mainanalysewidget.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -41,7 +41,7 @@ MainAnalyseWidget::MainAnalyseWidget(QWidget *parent):
setCentralWidget(mResultWidget);


// mToolBar = addToolBar("actions");
mToolBar = addToolBar("actions");


connect(mListWidget,SIGNAL(currentRowChanged(int)),mStackWidget,SLOT(setCurrentIndex(int)));
Expand All @@ -57,7 +57,7 @@ MainAnalyseWidget::~MainAnalyseWidget()
void MainAnalyseWidget::setRunner(AnalysisRunner *runner)
{
mRunner = runner;
// mToolBar->clear();
mToolBar->clear();


setWindowTitle(mRunner->filename());
Expand Down
2 changes: 1 addition & 1 deletion utils/format_detection.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -62,7 +62,7 @@ bool is_xz(QIODevice* file)
{
if (file->open(QIODevice::ReadOnly))
{
QByteArray magic_number = file->read(2);
QByteArray magic_number = file->read(6);
file->close();

if (magic_number.isEmpty())
Expand Down

0 comments on commit 3d0cf56

Please sign in to comment.