Commit a018cd46 authored by Ingemar Ceicer's avatar Ingemar Ceicer

Package for Slackware and Paspberry Pi3


Former-commit-id: 043d6763
parent 382fe330
......@@ -40,6 +40,7 @@ Hash::Hash(QWidget *parent) :
connect(ui->actionOpenComparisonList, SIGNAL(triggered()), this, SLOT(openComparisonList()));
connect(ui->actionCreateChecksumLists, SIGNAL(triggered()), this, SLOT(checkSumLists())); //Rekursivt
// Save
connect(ui->actionSaveToFile, SIGNAL(triggered()), this, SLOT(saveOne()));
// Recent Files, undermeny
connect(ui->menuRecentFiles,SIGNAL(aboutToShow()),this,SLOT(slotRecentFiles()));
connect(ui->actionCreateDebianMd5sums, SIGNAL(triggered()), this, SLOT(createDebianMd5sums()));
......@@ -692,6 +693,7 @@ void Hash::compareGivenHashSum()
if (dialog->exec())
{
ui->actionCopyPath->setDisabled(true);
ui->actionSaveToFile->setDisabled(true);
ui->actionCopyHashSum->setDisabled(true);
//ui->lineEdit->setToolTip(tr("Double-click to copy to clipboard"));
ui->progressLabel->clear();
......@@ -778,6 +780,7 @@ void Hash::findChangedFiles()
void Hash::checkSumListInit()
{
ui->actionCopyPath->setDisabled(true);
ui->actionSaveToFile->setDisabled(true);
ui->actionCopyHashSum->setDisabled(true);
//ui->lineEdit->setToolTip(tr("Double-click to copy to clipboard"));
checkSumList(0);
......@@ -1306,6 +1309,7 @@ void Hash::checksum()
if (dialog->exec())
{
ui->actionCopyPath->setDisabled(true);
ui->actionSaveToFile->setDisabled(true);
ui->actionCopyHashSum->setDisabled(true);
//ui->lineEdit->setToolTip(tr("Double-click to copy to clipboard"));
ui->progressLabel->clear();
......@@ -1385,6 +1389,7 @@ void Hash::checksum()
void Hash::compare()
{
ui->actionCopyPath->setDisabled(true);
ui->actionSaveToFile->setDisabled(true);
ui->actionCopyHashSum->setDisabled(true);
QString conf_file_name = QDir::toNativeSeparators("/" APPLICATION_NAME ".conf");
k = new Config(conf_file_name);
......@@ -1495,6 +1500,7 @@ void Hash::checkSumLists()
workerThread->start();
*/
ui->actionCopyPath->setDisabled(true);
ui->actionSaveToFile->setDisabled(true);
ui->actionCopyHashSum->setDisabled(true);
hurmangaFoldrar=0;
QString conf_file_name = QDir::toNativeSeparators("/" APPLICATION_NAME ".conf");
......@@ -2235,6 +2241,7 @@ bool Hash::askForFileNameCheck(QString sokvag2,std::string algoritm,QStringList
ui->progressLabel->setText(tr("Hash sum for ")+temp.setNum(antal)+tr(" of ")+temp.setNum(fileNames.count())+tr(" files was successfully calculated (Algorithm: ")+QString::fromStdString(algoritm)+")\n"+tr("Hash Sum values have been compared to old values in the file")+" \""+qdefaultfil+"\"");
ui->progressLabel->setToolTip(QDir::toNativeSeparators(tempfil2));
ui->actionCopyPath->setEnabled(true);
ui->actionSaveToFile->setEnabled(true);
}
return true;
}
......@@ -2317,6 +2324,7 @@ bool Hash::askForFileName(QString sokvag2,std::string algoritm,QStringList fileN
ui->progressLabel->setText(tr("Hash sum for ")+temp.setNum(antal)+tr(" of ")+temp.setNum(fileNames.count())+tr(" files was successfully calculated (Algorithm: ")+QString::fromStdString(algoritm)+")");
ui->progressLabel->setToolTip(QDir::toNativeSeparators(tempfil));
ui->actionCopyPath->setEnabled(true);
ui->actionSaveToFile->setEnabled(true);
}
return true;
}
......@@ -2377,6 +2385,7 @@ bool Hash::dontAskForFileName(std::string algoritm,QStringList fileNames)
ui->progressLabel->setText(tr("Hash sum for ")+temp.setNum(antal)+tr(" of ")+temp.setNum(fileNames.count())+tr(" files was successfully calculated (Algorithm: ")+QString::fromStdString(algoritm)+")");
ui->progressLabel->setToolTip(QDir::toNativeSeparators(tempfil));
ui->actionCopyPath->setEnabled(true);
ui->actionSaveToFile->setEnabled(true);
return true;
}
bool Hash::doChecksum(QString in)
......@@ -2423,6 +2432,7 @@ bool Hash::doChecksum(QString in)
ui->progressLabel->setText("\""+filnamnet +tr("\" has hash sum")+" ("+tr("Algorithm: ")+QString::fromStdString(s)+")");
ui->progressLabel->setToolTip(QDir::toNativeSeparators(in));
ui->actionCopyPath->setEnabled(true);
ui->actionSaveToFile->setEnabled(true);
ui->actionCopyHashSum->setEnabled(true);
ui->lineEdit->setText(sum);
return true;
......@@ -2647,6 +2657,7 @@ bool Hash::doCompare(QString in1, QString in2)
}
ui->progressLabel->setToolTip(QDir::toNativeSeparators(in1+tr(" and ")+in2));
ui->actionCopyPath->setEnabled(true);
ui->actionSaveToFile->setEnabled(true);
ui->actionCopyHashSum->setEnabled(true);
ui->lineEdit->setText(sum1 +tr(" and ") + sum2);
return true;
......@@ -3283,7 +3294,63 @@ void Hash::save()
delete k;
}
void Hash::saveOne()
{
QString conf_file_name = QDir::toNativeSeparators("/" APPLICATION_NAME ".conf");
k = new Config(conf_file_name);
QString sokvag;
std::string save_path = k->getConf("save_path");
std::string algorithm = k->getConf("algorithm");
QString qsalgorithm = QString::fromStdString(algorithm);
QString qsave_path = QString::fromStdString(save_path);
QFileInfo info(qsave_path);
if (info.isReadable())
sokvag = qsave_path;
else
sokvag = QDir::homePath();
std::string usenativedialogs = k->getConf("usenativedialogs");
QString shecksumman = ui->lineEdit->text();
QString path = QDir::toNativeSeparators(ui->progressLabel->toolTip());
QFileDialog *dialog = new QFileDialog(this, tr("Save the hash summary list as a text file"), sokvag, tr("Any file (*)"));
dialog->setAcceptMode(QFileDialog::AcceptSave);
dialog->setFileMode(QFileDialog::AnyFile);
dialog->setViewMode(QFileDialog::Detail);
if (usenativedialogs == "0")
dialog->setOption(QFileDialog::DontUseNativeDialog,true);
else if (usenativedialogs == "1")
dialog->setOption(QFileDialog::DontUseNativeDialog,false);
if (dialog->exec())
{
QString qsdatetime = QDateTime::currentDateTime().toString(Qt::ISODate)+"\n";
QStringList sl = dialog->selectedFiles();
QString fileName = sl.at(0);
if (fileName.isEmpty())
return;
else
{
QFile file(fileName);
if (!file.open(QIODevice::WriteOnly | QIODevice::Text))
{
QMessageBox::critical(this, APPLICATION_NAME " " VERSION,tr("Could not save a file to store hash sums in. Check your file permissions. ")+file.errorString());
delete k;
return;
}
else
{
QTextStream out(&file);
out << qsdatetime;
out << tr("Algorithm: ")+qsalgorithm << endl;
out << path << endl;
out << shecksumman << endl;
QDir dir;
dir = dialog->directory();
QString directoryName = dir.path();
k->setConf("save_path",directoryName.toStdString());
}
}
}
delete k;
}
void Hash::dragEnterEvent(QDragEnterEvent *ev)
{
......
......@@ -38,7 +38,7 @@
#define VERSION_PATH "http://bin.ceicer.com/hash/version.txt"
#define APPLICATION_NAME "hashSum"
#define EXECUTABLE_NAME "hashsum"
#define VERSION "2.2.3"
#define VERSION "2.2.4"
#define BUILD_DATE_TIME __DATE__ " " __TIME__
#define CURRENT_YEAR "2017"
#define LICENCE_VERSION "3"
......@@ -179,6 +179,7 @@ private slots:
void openFile();
void save();
void saveOne();
public slots:
......
......@@ -38,7 +38,7 @@ greaterThan(QT_MAJOR_VERSION, 4): QT += widgets
# GCC
TEMPLATE = app
TARGET = hashsum-2.2.3
TARGET = hashsum-2.2.4
#DEPENDPATH += .
#INCLUDEPATH += .
......
......@@ -153,6 +153,7 @@
<addaction name="actionFindChangedFiles"/>
<addaction name="actionCopyHashSum"/>
<addaction name="actionCopyPath"/>
<addaction name="actionSaveToFile"/>
</widget>
<widget class="QMenu" name="menuText">
<property name="title">
......@@ -568,6 +569,14 @@
<string>German</string>
</property>
</action>
<action name="actionSaveToFile">
<property name="enabled">
<bool>false</bool>
</property>
<property name="text">
<string>Save to file</string>
</property>
</action>
</widget>
<layoutdefault spacing="6" margin="11"/>
<customwidgets>
......
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
/********************************************************************************
** Form generated from reading UI file 'license.ui'
**
** Created by: Qt User Interface Compiler version 5.9.1
**
** WARNING! All changes made in this file will be lost when recompiling UI file!
********************************************************************************/
#ifndef UI_LICENSE_H
#define UI_LICENSE_H
#include <QtCore/QVariant>
#include <QtWidgets/QAction>
#include <QtWidgets/QApplication>
#include <QtWidgets/QButtonGroup>
#include <QtWidgets/QDialog>
#include <QtWidgets/QGridLayout>
#include <QtWidgets/QHBoxLayout>
#include <QtWidgets/QHeaderView>
#include <QtWidgets/QPushButton>
#include <QtWidgets/QSpacerItem>
#include <QtWidgets/QSplitter>
#include <QtWidgets/QTextBrowser>
#include <QtWidgets/QWidget>
QT_BEGIN_NAMESPACE
class Ui_Lic
{
public:
QGridLayout *gridLayout;
QSplitter *splitter;
QTextBrowser *textBrowser;
QWidget *layoutWidget;
QHBoxLayout *horizontalLayout;
QSpacerItem *horizontalSpacer_2;
QPushButton *pbClose;
QSpacerItem *horizontalSpacer;
QPushButton *pbOpenFile;
QSpacerItem *horizontalSpacer_3;
void setupUi(QDialog *Lic)
{
if (Lic->objectName().isEmpty())
Lic->setObjectName(QStringLiteral("Lic"));
Lic->setWindowModality(Qt::NonModal);
Lic->resize(858, 529);
QSizePolicy sizePolicy(QSizePolicy::Maximum, QSizePolicy::Maximum);
sizePolicy.setHorizontalStretch(0);
sizePolicy.setVerticalStretch(0);
sizePolicy.setHeightForWidth(Lic->sizePolicy().hasHeightForWidth());
Lic->setSizePolicy(sizePolicy);
Lic->setMinimumSize(QSize(0, 0));
Lic->setMaximumSize(QSize(16777215, 16777215));
Lic->setContextMenuPolicy(Qt::DefaultContextMenu);
QIcon icon;
icon.addFile(QStringLiteral(":/images/hashsum.ico"), QSize(), QIcon::Normal, QIcon::Off);
Lic->setWindowIcon(icon);
Lic->setModal(true);
gridLayout = new QGridLayout(Lic);
gridLayout->setObjectName(QStringLiteral("gridLayout"));
splitter = new QSplitter(Lic);
splitter->setObjectName(QStringLiteral("splitter"));
splitter->setOrientation(Qt::Vertical);
textBrowser = new QTextBrowser(splitter);
textBrowser->setObjectName(QStringLiteral("textBrowser"));
sizePolicy.setHeightForWidth(textBrowser->sizePolicy().hasHeightForWidth());
textBrowser->setSizePolicy(sizePolicy);
splitter->addWidget(textBrowser);
layoutWidget = new QWidget(splitter);
layoutWidget->setObjectName(QStringLiteral("layoutWidget"));
horizontalLayout = new QHBoxLayout(layoutWidget);
horizontalLayout->setObjectName(QStringLiteral("horizontalLayout"));
horizontalLayout->setContentsMargins(0, 0, 0, 0);
horizontalSpacer_2 = new QSpacerItem(40, 20, QSizePolicy::Expanding, QSizePolicy::Minimum);
horizontalLayout->addItem(horizontalSpacer_2);
pbClose = new QPushButton(layoutWidget);
pbClose->setObjectName(QStringLiteral("pbClose"));
pbClose->setEnabled(true);
QSizePolicy sizePolicy1(QSizePolicy::Fixed, QSizePolicy::Fixed);
sizePolicy1.setHorizontalStretch(0);
sizePolicy1.setVerticalStretch(0);
sizePolicy1.setHeightForWidth(pbClose->sizePolicy().hasHeightForWidth());
pbClose->setSizePolicy(sizePolicy1);
horizontalLayout->addWidget(pbClose);
horizontalSpacer = new QSpacerItem(40, 20, QSizePolicy::Minimum, QSizePolicy::Minimum);
horizontalLayout->addItem(horizontalSpacer);
pbOpenFile = new QPushButton(layoutWidget);
pbOpenFile->setObjectName(QStringLiteral("pbOpenFile"));
sizePolicy1.setHeightForWidth(pbOpenFile->sizePolicy().hasHeightForWidth());
pbOpenFile->setSizePolicy(sizePolicy1);
horizontalLayout->addWidget(pbOpenFile);
horizontalSpacer_3 = new QSpacerItem(40, 20, QSizePolicy::Expanding, QSizePolicy::Minimum);
horizontalLayout->addItem(horizontalSpacer_3);
splitter->addWidget(layoutWidget);
gridLayout->addWidget(splitter, 0, 0, 1, 1);
retranslateUi(Lic);
QMetaObject::connectSlotsByName(Lic);
} // setupUi
void retranslateUi(QDialog *Lic)
{
Lic->setWindowTitle(QApplication::translate("Lic", "Dialog", Q_NULLPTR));
pbClose->setText(QApplication::translate("Lic", "Close", Q_NULLPTR));
pbOpenFile->setText(QApplication::translate("Lic", "Save", Q_NULLPTR));
} // retranslateUi
};
namespace Ui {
class Lic: public Ui_Lic {};
} // namespace Ui
QT_END_NAMESPACE
#endif // UI_LICENSE_H
( cd usr/local/bin ; rm -rf hashsum )
( cd usr/local/bin ; ln -sf /usr/local/hashsum/hashsum-2.2.3 hashsum )
( cd usr/local/bin ; ln -sf /usr/local/hashsum/hashsum-2.2.4 hashsum )
......@@ -6,7 +6,7 @@
# customary to leave one space after the ':'.
|-----handy-ruler------------------------------------------------------|
hashsum: hashsum 2.2.3 (64-bit)
hashsum: hashsum 2.2.4 (64-bit)
hashsum: Calculate hash summs and compare files and text.
hashsum:
hashsum:
......
hashSum 2.2.3 Copyright (C) 2011-2017 Ingemar Ceicer
hashSum 2.2.4 Copyright (C) 2011-2017 Ingemar Ceicer
http://ceicer.org/hash/index_eng.php
programmering1 (at) ceicer (dot) org
......
14:24 August 10, 2017
Changes from version 2.2.3 to 2.2.4
Ability to save hash sums in text files
Compiled with Qt 5.9.1, GCC 5.3.0
23:30 July 22, 2017
Changes from version 2.2.1 to 2.2.3
Drag and drop functionality
......
23:30 July 22, 2017
14:24 10 augusti 2017
Ändringar från version 2.2.3 till 2.2.4
Möjlighet att spar hashsummor i textfiler
Compiled with Qt 5.9.1, GCC 5.3.0
23:30 22 juli 2017
Ändringar från version 2.2.1 till 2.2.3
Drag and drop funktionalitet
Möjlighet att öppna flera filer samtidigt
......
( cd usr/local/bin ; rm -rf hashsum )
( cd usr/local/bin ; ln -sf /usr/local/hashsum/hashsum-2.2.3 hashsum )
( cd usr/local/bin ; ln -sf /usr/local/hashsum/hashsum-2.2.4 hashsum )
......@@ -6,7 +6,7 @@
# customary to leave one space after the ':'.
|-----handy-ruler------------------------------------------------------|
hashsum: hashsum 2.2.3 (32-bit)
hashsum: hashsum 2.2.4 (32-bit)
hashsum: Calculate hash summs and compare files and text.
hashsum:
hashsum:
......
hashSum 2.2.3 Copyright (C) 2011-2017 Ingemar Ceicer
hashSum 2.2.4 Copyright (C) 2011-2017 Ingemar Ceicer
http://ceicer.org/hash/index_eng.php
programmering1 (at) ceicer (dot) org
......
23:30 July 22, 2017
Changes from version 2.2.1 to 2.2.3
Drag and drop functionality
Ability to open multiple files at once
Displays version history
14:24 August 10, 2017
Changes from version 2.2.3 to 2.2.4
Ability to save hash sums in text files
Compiled with Qt 5.9.1, GCC 7.1.0
20:23 January 15, 2017
......
23:30 July 22, 2017
Ändringar från version 2.2.1 till 2.2.3
Drag and drop functionality
Ability to open multiple files at once
Displays version history
14:24 10 augusti 2017
Ändringar från version 2.2.3 till 2.2.4
Möjlighet att spar hashsummor i textfiler
Compiled with Qt 5.9.1, GCC 7.1.0
20:23 15 januari 2017
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment