summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorArno <arno@disconnect.de>2015-06-06 14:16:32 +0200
committerArno <arno@disconnect.de>2015-06-06 14:16:32 +0200
commit7ffee99071517f5f5533f067850e732efe171991 (patch)
tree56df5d31247e7dc88c531678540cbf3d91df7cc4
parent230feb71ce37cd6797e94247fab463841c7637cf (diff)
downloadSheMov-7ffee99071517f5f5533f067850e732efe171991.tar.gz
SheMov-7ffee99071517f5f5533f067850e732efe171991.tar.bz2
SheMov-7ffee99071517f5f5533f067850e732efe171991.zip
Get rid of Helper::centerDialog
It's useless if you don't use a tiling window manager. Also, now we have an empty class SmDialog. Didn't replace it yet. Maybe it's useful in the future.
-rw-r--r--helper.h1
-rw-r--r--newmoviewizard.cpp5
-rw-r--r--newmoviewizard.h3
-rw-r--r--shemov.cpp1
-rw-r--r--smdialog.cpp6
-rw-r--r--smdialog.h5
-rw-r--r--smdirwatcher.cpp2
7 files changed, 1 insertions, 22 deletions
diff --git a/helper.h b/helper.h
index 74aea3f..f8d03a0 100644
--- a/helper.h
+++ b/helper.h
@@ -32,7 +32,6 @@ namespace Helper {
QVariant bytesFromUnit(QVariant number, const QString unit);
const QStringList toStringList(const QList<QVariant> &list);
const QString colorToHtml(const QColor &color);
- void centerWidget(QWidget *widget);
QVariantMap ffmpegData(const QString &path);
QJsonDocument streamData(const QString &path);
QPixmap preview(const QString &path);
diff --git a/newmoviewizard.cpp b/newmoviewizard.cpp
index 1989e64..8a50274 100644
--- a/newmoviewizard.cpp
+++ b/newmoviewizard.cpp
@@ -48,10 +48,6 @@ NewMovieWizard::NewMovieWizard(QWidget *parent) : QWizard(parent){
setOption(QWizard::IndependentPages, true);
}
-void NewMovieWizard::showEvent(QShowEvent *){
- Helper::centerWidget(this);
-}
-
void NewMovieWizard::accept(){
QSqlDatabase db = QSqlDatabase::database("treedb");
db.open();
@@ -427,7 +423,6 @@ void MovieInfoPage::initCompleters(){
void MovieInfoPage::addOld(){
QFileDialog *oldFileDlg = new QFileDialog(this, tr("Select source"), mCurrentDir);
- Helper::centerWidget(oldFileDlg);
int retval = oldFileDlg->exec();
if(retval != QDialog::Accepted || oldFileDlg->selectedFiles().isEmpty()){
oldFileDlg->deleteLater();
diff --git a/newmoviewizard.h b/newmoviewizard.h
index b65551b..df52905 100644
--- a/newmoviewizard.h
+++ b/newmoviewizard.h
@@ -38,9 +38,6 @@ class NewMovieWizard : public QWizard {
MovieMappingPage *actorPage() { return mActorPage; }
MovieMappingPage *genrePage() { return mGenrePage; }
- protected:
- void showEvent(QShowEvent *);
-
private:
MovieInfoPage *mInfoPage;
MovieMappingPage *mActorPage;
diff --git a/shemov.cpp b/shemov.cpp
index 08094d6..efaa973 100644
--- a/shemov.cpp
+++ b/shemov.cpp
@@ -144,7 +144,6 @@ SheMov::SheMov(QWidget *parent, Qt::WindowFlags flags) : QMainWindow(parent, fla
mArchive->readSettings();
mArchiveBrowser->readConfig();
readSettings();
- Helper::centerWidget(picViewer);
// craptastic... We can't center until it's painted,
// hence this indirection :(
mFSWidget->centerCurrent();
diff --git a/smdialog.cpp b/smdialog.cpp
index 9f168f8..50f26be 100644
--- a/smdialog.cpp
+++ b/smdialog.cpp
@@ -17,12 +17,6 @@
#include "helper.h"
#include "unpacker.h"
-SmDialog::SmDialog(QWidget *parent, Qt::WindowFlags f) : QDialog(parent, f) {}
-
-void SmDialog::showEvent(QShowEvent *){
- Helper::centerWidget(this);
-}
-
SeriesPartsDialog::SeriesPartsDialog(QWidget *parent, Qt::WindowFlags f) : SmDialog(parent, f){
QFormLayout *mainLayout = new QFormLayout;
mSubtitle = new QLineEdit;
diff --git a/smdialog.h b/smdialog.h
index 6d1c9fb..2f0fb16 100644
--- a/smdialog.h
+++ b/smdialog.h
@@ -20,10 +20,7 @@ class Unpacker;
class SmDialog : public QDialog {
Q_OBJECT
public:
- explicit SmDialog(QWidget *parent = 0, Qt::WindowFlags f = 0);
-
- protected:
- virtual void showEvent(QShowEvent *);
+ explicit SmDialog(QWidget *parent = 0, Qt::WindowFlags f = 0) : QDialog(parent, f) {}
};
class SeriesPartsDialog : public SmDialog {
diff --git a/smdirwatcher.cpp b/smdirwatcher.cpp
index c5914ad..8c0f04a 100644
--- a/smdirwatcher.cpp
+++ b/smdirwatcher.cpp
@@ -38,8 +38,6 @@ void SmDirWatcher::setDir(const QString &dir, bool progress){
QWidget *fsWidget = SmGlobals::instance()->registeredWidgets().value("FSWidget");
QProgressDialog *pDlg = new QProgressDialog(tr("Gathering data..."), QString(), 0, d.count(), fsWidget);
if(progress){
- pDlg->setWindowModality(Qt::WindowModal);
- Helper::centerWidget(pDlg);
pDlg->show();
}
SmTreeItem *rootItem = new SmTreeItem(mNumFields);