From 6df65ecc1e29b6efeabc3ecf178cd9c75cf27322 Mon Sep 17 00:00:00 2001 From: Felix Kauselmann <2039670+selmf@users.noreply.github.com> Date: Sun, 10 Aug 2014 19:55:17 +0200 Subject: [PATCH] Remove openFromArgv() method. Remove unneeded debug statement. --- YACReader/main_window_viewer.cpp | 50 --------------------- YACReader/main_window_viewer.h | 1 - YACReaderLibrary/yacreader_local_server.cpp | 1 - 3 files changed, 52 deletions(-) diff --git a/YACReader/main_window_viewer.cpp b/YACReader/main_window_viewer.cpp index 93d2d72d..036d8667 100644 --- a/YACReader/main_window_viewer.cpp +++ b/YACReader/main_window_viewer.cpp @@ -169,8 +169,6 @@ void MainWindowViewer::setupUI() setWindowTitle("YACReader"); - //openFromArgv(); - checkNewVersion(); viewer->setFocusPolicy(Qt::StrongFocus); @@ -194,54 +192,6 @@ void MainWindowViewer::setupUI() hideToolBars(); } -void MainWindowViewer::openFromArgv() -{ - if(QCoreApplication::arguments().count() == 2) //only path... - { - isClient = false; - //TODO: new method open(QString) - QString pathFile = QCoreApplication::arguments().at(1); - QFileInfo fi(pathFile); - currentDirectory = fi.absoluteDir().path(); - getSiblingComics(fi.absolutePath(),fi.fileName()); - - setWindowTitle("YACReader - " + fi.fileName()); - enableActions(); - viewer->open(pathFile); - } - else if(QCoreApplication::arguments().count() == 4) - { - - QString pathFile = QCoreApplication::arguments().at(1); - currentDirectory = pathFile; - quint64 comicId = QCoreApplication::arguments().at(2).toULongLong(); - libraryId = QCoreApplication::arguments().at(3).toULongLong(); - - enableActions(); - - currentComicDB.id = comicId; - YACReaderLocalClient client; - int tries = 1; - bool success = false; - while(!(success = client.requestComicInfo(libraryId,currentComicDB,siblingComics)) && tries != 0) - tries--; - - if(success) - { - isClient = true; - open(pathFile+currentComicDB.path,currentComicDB,siblingComics); - } - else - { - isClient = false; - QMessageBox::information(this,"Connection Error", "Unable to connect to YACReaderLibrary"); - //error - } - - optionsDialog->setFilters(currentComicDB.info.brightness, currentComicDB.info.contrast, currentComicDB.info.gamma); - } -} - void MainWindowViewer::createActions() { openAction = new QAction(tr("&Open"),this); diff --git a/YACReader/main_window_viewer.h b/YACReader/main_window_viewer.h index fb616c43..758e2207 100644 --- a/YACReader/main_window_viewer.h +++ b/YACReader/main_window_viewer.h @@ -110,7 +110,6 @@ class YACReaderSliderAction; QString nextComicPath; //! Método que inicializa el interfaz. void setupUI(); - void openFromArgv(); void createActions(); void createToolBars(); void getSiblingComics(QString path,QString currentComic); diff --git a/YACReaderLibrary/yacreader_local_server.cpp b/YACReaderLibrary/yacreader_local_server.cpp index 34059522..a24c184f 100644 --- a/YACReaderLibrary/yacreader_local_server.cpp +++ b/YACReaderLibrary/yacreader_local_server.cpp @@ -51,7 +51,6 @@ void YACReaderLocalServer::sendResponse() connect(worker,SIGNAL(comicUpdated(quint64, ComicDB)),this,SIGNAL(comicUpdated(quint64, ComicDB))); connect(worker,SIGNAL(finished()),worker,SLOT(deleteLater())); worker->start(); - QLOG_INFO() << "connection incoming" << "Worker started"; } QLOG_INFO() << "connection incoming";