<commit_before>#include "MidasApplication.h"

#include <QPlastiqueStyle>
#include <QMessageBox>

#include "MIDASDesktopUI.h"
#include "Utils.h"
#include "Logger.h"
#include "MidasClientGlobal.h"

MidasApplication* MidasApplication::m_instance = NULL; 

MidasApplication * MidasApplication::instance()
  {
  if (MidasApplication::m_instance == NULL)
    {
    assert(qApp != NULL); 
    MidasApplication::m_instance = dynamic_cast<MidasApplication*>(qApp); 
    }
  assert(MidasApplication::m_instance != NULL); 
  return MidasApplication::m_instance; 
  }

MidasApplication::MidasApplication ( int & argc, char ** argv):
QApplication(argc, argv)
  {
  this->setStyle(new QPlastiqueStyle()); 
  }

int MidasApplication::exec()
  {
  Q_INIT_RESOURCE(MIDASDesktopIcons);

  this->MIDASDesktop = new MIDASDesktopUI();

  MIDASDesktop->show(); 

  //MIDASDesktop->signInOrOut(); 

  int code = QApplication::exec(); 
  delete this->MIDASDesktop; 
  return code; 
  }

bool MidasApplication::notify ( QObject* receiver, QEvent* event )
  {
  try
    {
    return QApplication::notify(receiver, event); 
    }
  catch (const std::exception& e)
    {
    std::stringstream text;
    text << "Caught exception during notify to object " <<
      receiver->objectName().toStdString();
    text << ". Message: " << e.what();
    this->MIDASDesktop->GetLog()->Error(text.str());
    }
  return false;
  }

<commit_msg>ENH: refs #0108. Turn off plastique style (it fails badly on linux now)<commit_after>#include "MidasApplication.h"

#include <QMessageBox>

#include "MIDASDesktopUI.h"
#include "Utils.h"
#include "Logger.h"
#include "MidasClientGlobal.h"

MidasApplication* MidasApplication::m_instance = NULL; 

MidasApplication* MidasApplication::instance()
{
  if (MidasApplication::m_instance == NULL)
    {
    assert(qApp != NULL); 
    MidasApplication::m_instance = dynamic_cast<MidasApplication*>(qApp); 
    }
  assert(MidasApplication::m_instance != NULL); 
  return MidasApplication::m_instance; 
}

MidasApplication::MidasApplication ( int & argc, char ** argv):
QApplication(argc, argv)
{
}

int MidasApplication::exec()
{
  Q_INIT_RESOURCE(MIDASDesktopIcons);

  this->MIDASDesktop = new MIDASDesktopUI();

  MIDASDesktop->show();

  int code = QApplication::exec(); 
  delete this->MIDASDesktop; 
  return code; 
}

bool MidasApplication::notify(QObject* receiver, QEvent* event)
{
  try
    {
    return QApplication::notify(receiver, event); 
    }
  catch (const std::exception& e)
    {
    std::stringstream text;
    text << "Caught exception during notify to object " <<
      receiver->objectName().toStdString();
    text << ". Message: " << e.what();
    this->MIDASDesktop->GetLog()->Error(text.str());
    }
  return false;
}


{'fraction_non_alphanumeric': 0.14072183740430186, 'fraction_numerical': 0.0014582573824279985, 'mean_word_length': 4.433663366336634, 'pattern_counts': {'":': 0, '<': 24, '<?xml version=': 0, '>': 24, 'https://': 0, 'lorem ipsum': 0, 'www.': 0, 'xml': 0}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 0, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'dir': 'git-commits-cleaned', 'id': '6606990', 'n_tokens_mistral': 944, 'n_tokens_neox': 899, 'n_words': 174}