Beispiel #1
0
DbHeaderListItem::DbHeaderListItem(QTreeWidget* parent, const QString& key)
    : QObject(parent),
      QTreeWidgetItem(parent)
{
    // Reset all item flags: item is not selectable.
    setFlags(Qt::ItemIsEnabled);

    setDisabled(false);
    setExpanded(true);

    setFirstColumnSpanned(true);
    setTextAlignment(0, Qt::AlignCenter);
    QFont fn0(font(0));
    fn0.setBold(true);
    fn0.setItalic(false);
    setFont(0, fn0);
    QFont fn1(font(1));
    fn1.setBold(true);
    fn1.setItalic(false);
    setFont(1, fn1);
    setText(0, key);
    slotThemeChanged();

    connect(ThemeManager::instance(), SIGNAL(signalThemeChanged()),
            this, SLOT(slotThemeChanged()));
}
Beispiel #2
0
static void testBindConstRef()
{
   CppTL::Functor1R<int,const HelperObject &> fn1( CppTL::cfn1r( &extractHelperObjectValue ) );
   HelperObject object;
   object.value_ = 12345678;
   CppTL::Functor0R<int> fn0 = CppTL::fn0r( CppTL::bind1r( fn1, CppTL::cref(object) ) );
   CPPUT_ASSERT_EQUAL( 12345678, fn0() );
}
Beispiel #3
0
static __attribute__((noinline)) void
fn6 (void)
{
  pthread_cleanup_push (clh, (void *) 7l);

  fn0 ();

  pthread_cleanup_pop (1);
}
Beispiel #4
0
static void testBindRef()
{
   CppTL::Functor1<HelperObject &> fnref1( CppTL::cfn1( &doubleHelperObjectValue ) );
   HelperObject object;
   object.value_ = 1111;
   CppTL::Functor0 fn0 = CppTL::fn0( CppTL::bind1( fnref1, CppTL::ref( object ) ) );
   fn0();
   CPPUT_ASSERT_EQUAL( 1111*2, object.value_ );
}
Beispiel #5
0
static __attribute__((noinline)) void
fn3 (void)
{
  /* This is the old LinuxThreads pthread_cleanup_{push,pop}.  */
     struct _pthread_cleanup_buffer b;
  _pthread_cleanup_push (&b, clh, (void *) 4l);

  fn0 ();

  _pthread_cleanup_pop (&b, 1);
}
Beispiel #6
0
static __inline__ __attribute__ ((always_inline)) void
fn6 (unsigned long long arg0, unsigned char arg1,
     unsigned char arg2, signed short arg3,
     unsigned int arg4, unsigned char * arg5)
{
  asm volatile ("" :: "g" (arg0), "g" ((unsigned long long) arg1),
		      "g" ((unsigned long long) arg2), "g" (arg3),
		      "g" (arg4), "g" (arg5));
  if (cond)
    {
      unsigned char loc0 = 0;
      fn0 (loc0, arg0, arg1, arg2, arg3, arg4, arg5);
    }
}
constexpr int
fn0 () noexcept
{
  int r = 0;
  for (int i = 0; i < 10; ++i)
    {
      continue;
      r++;
      for (int j = 0; j < 10; ++j )
	{
	}
    }
  return r;
}
static_assert (fn0 () == 0, "");

constexpr int
fn1 () noexcept
{
  int r = 0;
  for (int i = 0; i < 10; ++i)
    for (int j = 0; j < 10; ++j)
      {
	continue;
	r++;
      }
  return r;
}
static_assert (fn1 () == 0, "");
Beispiel #8
0
MdKeyListViewItem::MdKeyListViewItem(QTreeWidget* const parent, const QString& key)
    : QObject(parent), QTreeWidgetItem(parent)
{
    m_key          = key;
    m_decryptedKey = key;

    // Standard Exif key descriptions.
    if      (key == QLatin1String("Iop"))
    {
        m_decryptedKey = i18n("Interoperability");
    }
    else if (key == QLatin1String("Image"))
    {
        m_decryptedKey = i18n("Image Information");
    }
    else if (key == QLatin1String("Photo"))
    {
        m_decryptedKey = i18n("Photograph Information");
    }
    else if (key == QLatin1String("GPSInfo"))
    {
        m_decryptedKey = i18n("Global Positioning System");
    }
    else if (key == QLatin1String("Thumbnail"))
    {
        m_decryptedKey = i18n("Embedded Thumbnail");
    }

    // Standard IPTC key descriptions.
    else if (key == QLatin1String("Envelope"))
    {
        m_decryptedKey = i18n("IIM Envelope");
    }
    else if (key == QLatin1String("Application2"))
    {
        m_decryptedKey = i18n("IIM Application 2");
    }

    // Standard XMP key descriptions.
    else if (key == QLatin1String("aux"))
    {
        m_decryptedKey = i18n("Additional Exif Properties");
    }
    else if (key == QLatin1String("crs"))
    {
        m_decryptedKey = i18n("Camera Raw");
    }
    else if (key == QLatin1String("dc"))
    {
        m_decryptedKey = i18n("Dublin Core");
    }
    else if (key == QLatin1String("digiKam"))
    {
        m_decryptedKey = i18n("digiKam schema");
    }
    else if (key == QLatin1String("exif"))
    {
        m_decryptedKey = i18n("Exif-specific Properties");
    }
    else if (key == QLatin1String("iptc"))
    {
        m_decryptedKey = i18n("IPTC Core");
    }
    else if (key == QLatin1String("iptcExt"))
    {
        m_decryptedKey = i18n("IPTC Extension schema");
    }
    else if (key == QLatin1String("MicrosoftPhoto"))
    {
        m_decryptedKey = i18n("Microsoft Photo");
    }
    else if (key == QLatin1String("pdf"))
    {
        m_decryptedKey = i18n("Adobe PDF");
    }
    else if (key == QLatin1String("photoshop"))
    {
        m_decryptedKey = i18n("Adobe Photoshop");
    }
    else if (key == QLatin1String("plus"))
    {
        m_decryptedKey = i18n("PLUS License Data Format Schema");
    }
    else if (key == QLatin1String("tiff"))
    {
        m_decryptedKey = i18n("TIFF Properties");
    }
    else if (key == QLatin1String("xmp"))
    {
        m_decryptedKey = i18n("Basic Schema");
    }
    else if (key == QLatin1String("xmpBJ"))
    {
        m_decryptedKey = i18n("Basic Job Ticket");
    }
    else if (key == QLatin1String("xmpDM"))
    {
        m_decryptedKey = i18n("Dynamic Media");
    }
    else if (key == QLatin1String("xmpMM"))
    {
        m_decryptedKey = i18n("Media Management ");
    }
    else if (key == QLatin1String("xmpRights"))
    {
        m_decryptedKey = i18n("Rights Management");
    }
    else if (key == QLatin1String("xmpTPg"))
    {
        m_decryptedKey = i18n("Paged-Text");
    }

    // Additional XMP key descriptions.
    else if (key == QLatin1String("mwg-rs"))
    {
        m_decryptedKey = i18n("Metadata Working Group Regions");
    }
    else if (key == QLatin1String("dwc"))
    {
        m_decryptedKey = i18n("Darwin Core");
    }

    // Reset all item flags: item is not selectable.
    setFlags(Qt::ItemIsEnabled);

    setDisabled(false);
    setExpanded(true);

    setFirstColumnSpanned(true);
    setTextAlignment(0, Qt::AlignCenter);
    QFont fn0(font(0));
    fn0.setBold(true);
    fn0.setItalic(false);
    setFont(0, fn0);
    QFont fn1(font(1));
    fn1.setBold(true);
    fn1.setItalic(false);
    setFont(1, fn1);
    setText(0, m_decryptedKey);
    slotThemeChanged();

    connect(ThemeManager::instance(), SIGNAL(signalThemeChanged()),
            this, SLOT(slotThemeChanged()));
}