From ccb3a0aa3ae1ded6eb148431f7ed9648c7019340 Mon Sep 17 00:00:00 2001 From: David Sansome Date: Sat, 7 Jan 2012 22:58:30 +0000 Subject: [PATCH] Show a detailed error when the tagreader executable couldn't be started. --- src/core/tagreaderclient.cpp | 7 +++++++ src/core/tagreaderclient.h | 3 +++ 2 files changed, 10 insertions(+) diff --git a/src/core/tagreaderclient.cpp b/src/core/tagreaderclient.cpp index 834919d4b..1708d56c7 100644 --- a/src/core/tagreaderclient.cpp +++ b/src/core/tagreaderclient.cpp @@ -33,12 +33,19 @@ TagReaderClient::TagReaderClient(QObject* parent) sInstance = this; worker_pool_->SetExecutableName(kWorkerExecutableName); + connect(worker_pool_, SIGNAL(WorkerFailedToStart()), SLOT(WorkerFailedToStart())); } void TagReaderClient::Start() { worker_pool_->Start(); } +void TagReaderClient::WorkerFailedToStart() { + qLog(Error) << "The" << kWorkerExecutableName << "executable was not found" + << "in the current directory or on the PATH. Clementine will" + << "not be able to read music file tags without it."; +} + TagReaderReply* TagReaderClient::ReadFile(const QString& filename) { pb::tagreader::Message message; pb::tagreader::ReadFileRequest* req = message.mutable_read_file_request(); diff --git a/src/core/tagreaderclient.h b/src/core/tagreaderclient.h index f6dd2af88..3e2cf6bef 100644 --- a/src/core/tagreaderclient.h +++ b/src/core/tagreaderclient.h @@ -57,6 +57,9 @@ public: // TODO: Make this not a singleton static TagReaderClient* Instance() { return sInstance; } +private slots: + void WorkerFailedToStart(); + private: static TagReaderClient* sInstance;