Skip to content

Commit

Permalink
Beautify.
Browse files Browse the repository at this point in the history
  • Loading branch information
textbrowser committed May 21, 2024
1 parent ac73eaa commit 8f780b7
Show file tree
Hide file tree
Showing 2 changed files with 10 additions and 11 deletions.
1 change: 1 addition & 0 deletions Documentation/TO-DO
Original file line number Diff line number Diff line change
Expand Up @@ -606,6 +606,7 @@
biblioteq_callnum_table_item.[cc, h] (Completed)
biblioteq_copy_editor_book.[cc, h] (Completed)
biblioteq_files.[cc, h] (Completed)
biblioteq_generic_thread.[cc, h] (Completed)
biblioteq_graphicsitempixmap.h (Completed)
biblioteq_hyperlinked_text_edit.[cc, h] (Completed)
biblioteq_image_drop_site.[cc, h] (Completed)
Expand Down
20 changes: 9 additions & 11 deletions Source/biblioteq_generic_thread.cc
Original file line number Diff line number Diff line change
Expand Up @@ -38,9 +38,8 @@ extern "C"
#endif
}

biblioteq_generic_thread::biblioteq_generic_thread(QObject *parent,
biblioteq *biblioteq):
QThread(parent)
biblioteq_generic_thread::biblioteq_generic_thread
(QObject *parent, biblioteq *biblioteq):QThread(parent)
{
m_eType = "";
m_errorStr = "";
Expand Down Expand Up @@ -95,16 +94,17 @@ void biblioteq_generic_thread::run(void)
{
QFile qf;
QTextStream qts;
biblioteq_myqstring str = "";
biblioteq_myqstring str("");

if(!m_filename.trimmed().isEmpty())
qf.setFileName(m_filename);

if(m_filename.trimmed().isEmpty() || !qf.open(QIODevice::ReadOnly))
if(!qf.open(QIODevice::ReadOnly) || m_filename.trimmed().isEmpty())
{
if(m_filename.trimmed().isEmpty())
m_errorStr = tr("The configuration file "
"(typically biblioteq.conf) cannot be read.");
m_errorStr = tr
("The configuration file (typically biblioteq.conf) "
"cannot be read.");
else
m_errorStr = tr
("Unable to read %1. This file is required by BiblioteQ.").
Expand Down Expand Up @@ -202,7 +202,7 @@ void biblioteq_generic_thread::run(void)
zoomResultSet = ZOOM_connection_search_pqf
(zoomConnection, m_z3950SearchStr.toLatin1().constData());

auto format = hash.value("Format").trimmed().toLower();
auto format(hash.value("Format").trimmed().toLower());

if(format.isEmpty())
format = "render";
Expand Down Expand Up @@ -257,9 +257,7 @@ void biblioteq_generic_thread::setFilename(const QString &filename)

void biblioteq_generic_thread::setOutputList(const QList<bool> &list)
{
int i = 0;

for(i = 0; i < list.size(); i++)
for(int i = 0; i < list.size(); i++)
m_outputListBool.append(list.at(i));
}

Expand Down

0 comments on commit 8f780b7

Please sign in to comment.