File indexing completed on 2024-03-24 03:54:29
0001 /* 0002 This file is part of the KDE Baloo Project 0003 SPDX-FileCopyrightText: 2015 Pinak Ahuja <pinak.ahuja@gmail.com> 0004 0005 SPDX-License-Identifier: LGPL-2.1-only OR LGPL-3.0-only OR LicenseRef-KDE-Accepted-LGPL 0006 */ 0007 0008 #include "indexerstate.h" 0009 0010 #include <KLocalizedString> 0011 0012 QString Baloo::stateString(IndexerState state) 0013 { 0014 QString status = i18n("Unknown"); 0015 switch (state) { 0016 case Idle: 0017 status = i18n("Idle"); 0018 break; 0019 case Suspended: 0020 status = i18n("Suspended"); 0021 break; 0022 case FirstRun: 0023 status = i18n("Initial Indexing"); 0024 break; 0025 case NewFiles: 0026 status = i18n("Indexing new files"); 0027 break; 0028 case ModifiedFiles: 0029 status = i18n("Indexing modified files"); 0030 break; 0031 case XAttrFiles: 0032 status = i18n("Indexing Extended Attributes"); 0033 break; 0034 case ContentIndexing: 0035 status = i18n("Indexing file content"); 0036 break; 0037 case UnindexedFileCheck: 0038 status = i18n("Checking for unindexed files"); 0039 break; 0040 case StaleIndexEntriesClean: 0041 status = i18n("Checking for stale index entries"); 0042 break; 0043 case LowPowerIdle: 0044 status = i18n("Idle (Powersave)"); 0045 break; 0046 case Unavailable: 0047 status = i18n("Not Running"); 0048 break; 0049 case Startup: 0050 status = i18n("Starting"); 0051 break; 0052 } 0053 return status; 0054 } 0055 0056 QString Baloo::stateString(int state) 0057 { 0058 return stateString(static_cast<IndexerState>(state)); 0059 } 0060 0061 #include "moc_indexerstate.cpp"